Add extra include/lib paths to MinGW

I would like to add some extra include/lib directories besides the default ones for MinGW to search upon compilation. The reason for this is because the hard drive I currently have MinGW installed into is nearly full and so I had to install Qt into my second one instead. Thus, how can I have MinGW include the Qt files by default?


You can set environment variables CPLUS_INCLUDE_PATH for include directories and LIBRARY_PATH for library directories. More information can be found in Environment Variables Affecting GCC

Use -Idirective for extra includes and -Ldirective for extra library paths such as:

g++ [...] -I C:\qt\include -L C:\qt\lib

You can use multiple -Iand -Loptions.

Need Your Help

Call private methods and private properties from outside a class in PHP

php visibility introspection

I want to access private methods and variables from outside the classes in very rare specific cases.

how to load all assemblies from within your /bin directory

c# assemblies

In a web application, I want to load all assemblies in the /bin directory.