While trying to help with some other mingw/tdm-gcc questions, I've been trying doing some experiments with tdm64-gcc-5.1.0-2. At some point, I realized that I wasn't exactly sure what I was building. The libraries were being placed in lib\gcc_dll, so I assumed they were 32 bit libraries. But while using them in codeblocks, I realized I wasn't setting 32bit options. So I looked at the headers for the libraries with dumpbin, and that confirmed that they were in fact 64 bit libraries.
So I guess my questions are:
1) Shouldn't 64bit libraries built with mingw/tdm be placed in lib\gcc_x64_dll or lib\gcc_x64_lib to avoid confusion?
2) I was able to do that by adding "COMPILER_PREFIX=gcc_x64" to the options mingw32-make. Is there a better option to set to do that instead?
mingw/tdm-gcc lib locations
-
- Super wx Problem Solver
- Posts: 466
- Joined: Tue Jun 20, 2006 6:47 pm
- Contact:
-
- Super wx Problem Solver
- Posts: 466
- Joined: Tue Jun 20, 2006 6:47 pm
- Contact:
Re: mingw/tdm-gcc lib locations
As sort of a followup while investigating these things, I compared the visual studio and gcc make files. With visual studio, the output folder is set in wx_setup.props with the line:
while in the gcc make files, the folder is set with
Basically with visual studio, the wxArchSuffix (which I think is set automatically and can't be changed by the user) gets added to the folder name, but with gcc, the option COMPILER_VERSION (which is an empty string by default, but can be set by the user) is used instead. Shouldn't the folder naming be consistent, or am I completely misunderstanding these things?
Code: Select all
<wxOutDirName>$(wxCompilerPrefix)$(wxArchSuffix)_$(wxLibTypeSuffix)$(wxCfg)</wxOutDirName>
Code: Select all
LIBDIRNAME = \
..\..\lib\$(COMPILER_PREFIX)$(COMPILER_VERSION)_$(LIBTYPE_SUFFIX)$(CFG)
Re: mingw/tdm-gcc lib locations
I agree that this is at least inconsistent. But as this is a user forum and there are no wxWidgets core developers here, things like this are better discussed on the mailing list or Google group: https://groups.google.com/forum/#!forum/wx-users
Use the source, Luke!
Re: mingw/tdm-gcc lib locations
I have TDM 32 and TDM 64 in different folders. When I wish 32 bit version I do in the command line:
An for the 64 bits
Note the CFG flag, which makes my 32bit libs to be in my/wx/dir/\lib\gcc_lib32 and similar the 64 bit version.
When building an app, I just use the proper compiler version and change wx libs dirs.
It's possible also to use TDM-GCC-64 for building 32 bits. But I don't trust it, call me wary.
Code: Select all
PATH=%PATH%;C:\TDM-GCC-32\bin
mingw32-make -f makefile.gcc BUILD=debug USE_OPENGL=1 CFG=32 CXXFLAGS="-std=gnu++11"
Code: Select all
PATH=%PATH%;C:\TDM-GCC-64\bin
mingw32-make -f makefile.gcc BUILD=debug USE_OPENGL=1 CFG=64 CXXFLAGS="-std=gnu++11"
When building an app, I just use the proper compiler version and change wx libs dirs.
It's possible also to use TDM-GCC-64 for building 32 bits. But I don't trust it, call me wary.