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 2 of 2
  1. #1
    New Coder complete's Avatar
    Join Date
    Jul 2005
    Location
    USA
    Posts
    87
    Thanks
    2
    Thanked 0 Times in 0 Posts

    setting the path for a command-line compile

    I am working on a windows XP system. I am doing a command line compile and link using a makefile. It works except for the fact that it cannot find some header files.

    It has been a long time since I have done this sort of build. I remember that the path a compiler uses to find a header file is determined by the "Path" that you see when you type "path" on the command line.

    How do you add a new path to the "path"on the command line? Isn't this what we need to do if the compiler cannot find a header file?

    I think it is

    path= 'PATH'+'C:\somedirectory;'

    or something like that or maybe you have to put a dollar sign in front of the path. I need to do this just right or else I might wipe out the path string.

  • #2
    Regular Coder ralph l mayo's Avatar
    Join Date
    Nov 2005
    Posts
    951
    Thanks
    1
    Thanked 31 Times in 29 Posts
    Look at your compiler command-line flags documentation. For gcc you can pass -I/somepath/ -I/someotherpath/ -I/etc/etc/etc, which is preferable to messing with the environment


  •  

    Posting Permissions

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