H开发者_如何学Goow do you make .h files globally accessible by for example #include ? If its compiler specific either migw or gcc. C++
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.
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).
精彩评论