How to add 3rd party libraries to MinGW?
问题 I've just set up MinGW environment following this post But how to add 3rd party libraries to it? 回答1: A library consists of two main components - the C header files and the compiled object code archive. GCC has a bewildering array of ways of specifying these things, but let's say you are using a library foo.a which lives in the relative directory path foo/lib , and a header foo.h which lives in foo/inc . Your own C code lives in main.c and looks like this: #include "foo.h" int main() { return