开发者

External Library

开发者 https://www.devze.com 2023-01-16 13:23 出处:网络
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\" optio

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

0

精彩评论

暂无评论...
验证码 换一张
取 消