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.

>>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.

Might depend on the compiler, but normally it looks in either the PATH environment variable or the path in the -I option flag.

>>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?
No. see above comment
<snip> -Ic:\Program Files\<rest of path here>

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.