A: All compiler settings are managed at Tools >> Compiler Options. One can add a set in the following ways:
- Use "Add compiler set by folder" and point Dev-C++ to the folder where your compiler is installed. Dev-C++ will then attempt to configure it by asking the following program about the compiler folder layout:
\bin\gcc.exe
- Use "Add an empty set" and fill out the options yourself.
Q: I want to compile for 32-bit with my TDM-GCC x64 install. How do I do that?
A: The simplest way to do that is to select a preconfigured compiler set that will compile for 32bit. Go to Tools >> Compiler Options and check if the list contains any. If it does, select it and click OK. Repeat this step for each project at Project >> Project Options >> Compiler.
To manually create such a compiler set, you need to do two things:
- Add '-m32' to the compiler command. Use "Compiler with the following pointer width" at "Settings >> Code Generation" or type it in a custom command at "General >> Add the following commands when calling the compiler".
- Use different libraries. Go to Directories >> Libraries and replace the "(..)lib" directories with "(..)lib32".
Q: I'm specifically compiling for 32bit or 64bit, but GCC is throwing errors at me!
A: If it looks like this:
skipping incompatible (directory)/libmingw32.a when searching for -lmingw32
skipping incompatible (directory)\libmingw32.a when searching for -lmingw32
skipping incompatible (directory)/libmoldname.a when searching for -lmoldname
skipping incompatible (directory)\libmoldname.a when searching for -lmoldname
...
... then you need to change the library directory. Go to Tools >> Compiler Options >> (select the current compiler) >> Directories >> Libraries. There, use "(...)lib" folders for 64bit, or (...)lib32 for 32bit".