Skip to content

Instantly share code, notes, and snippets.

@ThirdPartyNinjas
Created May 23, 2017 15:58
Show Gist options
  • Save ThirdPartyNinjas/d9e1999017afb879c45250febc9e4a95 to your computer and use it in GitHub Desktop.
Save ThirdPartyNinjas/d9e1999017afb879c45250febc9e4a95 to your computer and use it in GitHub Desktop.
Adding local search paths to MinGW/MSYS
Instructions copied from here: http://www.mingw.org/wiki/HOWTO_Use_the_GCC_specs_file
1) Check for an existing gcc specs file in <mingw-root>/lib/gcc/mingw32/<gcc-version>
2) If it doesn't exist, generate one
cd <mingw-root>/lib/gcc/mingw32/<gcc-version>
gcc -dumpspecs > specs
3) Add to the top of the specs file
*local_prefix:
<mingw-root>/local/
*local_includes:
-I%(local_prefix)include
*local_lib_search:
-L%(local_prefix)lib
4) Add %(local_includes) to the end of the *cpp entry
5) Add %(local_includes) to the end of the *cc1plus entry
6) Add %(local_lib_search) to the end of the *link_libgcc entry
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment