Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Senior Coder Nightfire's Avatar
    Join Date
    Jun 2002
    Posts
    4,266
    Thanks
    6
    Thanked 48 Times in 48 Posts

    easier way for dos paths?

    I'm using c++ and in dos I'm having to go from 'c:\ms' (windows dir) to c:\minGW\bin then having to compile sources from c:\cpp, so I'm using

    cd c:\minGW\bin
    gcc -o c:\cpp\hello c:\cpp\hello.o -mwindows

    There must be an easier way? I'm spending more time just getting to filenames than creating programs and such

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    UK
    Posts
    1,137
    Thanks
    0
    Thanked 0 Times in 0 Posts
    you could create a .bat file or something

    scroots
    Spammers next time you spam me consider the implications:
    (1) that you will be persuaded by me(in a legitimate mannor)
    (2)It is worthless to you, when i have finished

  • #3
    Regular Coder
    Join Date
    Feb 2003
    Location
    California
    Posts
    925
    Thanks
    0
    Thanked 0 Times in 0 Posts
    not to familiar with dos, but wouldn't a makefile serve your purpose?


    Jason

  • #4
    Senior Coder Nightfire's Avatar
    Join Date
    Jun 2002
    Posts
    4,266
    Thanks
    6
    Thanked 48 Times in 48 Posts
    After a bit of playing around, I've managed to take the cd c:\minGW\bin out of the dos commands by adding

    set PATH=c:\minBW\bin;%PATH%

    into the autoexec.bat file in my c drive, but I'm stumped on how to shorten the rest down

    gcc -o c:\cpp\hello c:\cpp\hello.o -mwindows

    The c:\cpp will always be the same in all my files I do


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •