Cygwin & makefiles - not finding files in -I'd directory
This is a bit cryptic, but here's the info I have...
My Makefile looks something like: Code:
INCDIR = -I~/HDKProjects/Hydrous2/WaveTools2/WaveTools/ \ The first file it tries to compile has an include like so: Code:
#include <SampledWave.h> However, when I try to compile, I get a "fatal error, can not open included file 'SampledWave.h': No such file or directory." I've checked that I have read permissions. I've copy/pasted all paths from the make file into cygwin to be sure there are no spelling/capitalization errors, I've tried removing the '~' & using the full path, I've tried with a space after the "-I" & without. I've tried putting a link to ~/HDKProjects/Hydrous2/WaveTools2/WaveTools/ in /usr/include & then changed the #include to be <foo/SampledWave.h>. Nothing seems to work. If it helps, this is what the makefile spits out for the compile line: Code:
> make |
It's been a while, but could the cl compiler not like the UNIX style paths you give it for the include files?
|
I have not touched C for a while. I wonder if you have tried
#include "SampledWave.h" or #include "full path to SampledWave.h" I remember that C compiler uses different algorithms to search for <xyz.h> than "xyz.h". (check the reference of cl) |
Quote:
|
In Makefile, instead of ~, you could use the HOME environment variable, i.e.
Code:
INCDIR = -I$HOME/HDKProjects/Hydrous2/WaveTools2/WaveTools/ \ |
The expansion of '~' to equal your $HOME directory is a BASH feature and is not supported by 'make'.
Sometimes you may need to set LD_LIBRARY_PATH or, more to your case, C_INCLUDE_PATH when using Mingw32 or cygwin |
Quote:
Either way, using the full path (i.e. c:/cygwin/home/...) or $HOME works, so I'm all set. ;) |
All times are GMT -5. The time now is 04:33 PM. |