tags:

views:

45

answers:

2
+1  Q: 

External Libary

How do you make .h files globally accessible by for example #include ? If its compler specific either migw or gcc. C++

+3  A: 

If I understand your question correctly, you want the "-I" option to the compiler -- this will add a directory to the include-file search path.

jsegal
A: 

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

rubenvb
The -I solution is a lot more general. Copying arbitrary files to your default include path seems like a bad idea in general.
Aurojit Panda