How do you make .h files globally accessible by for example #include ? If its compiler specific either migw or gcc. C++
2 Answers
The thing I do, is install headers in
/i686-pc-mingw32/include
libs in
/i686-pc-mingw32/lib
and dll's in
/i686-pc-mingw32/bin
and add that last one to PATH (so relevant dll's will be found by programs you build).
For mingw-w64 switch i686-pc-mingw32 with either i686-w64-mingw32 (32-bit) or x86_64-w64-mingw32 (64-bit).
This allows #include to find the file without any additional -I switches. It is identical to a make install on linux (in most simple cases).
1 Comment
Aurojit Panda
The -I solution is a lot more general. Copying arbitrary files to your default include path seems like a bad idea in general.