Author Topic: TDM-GCC 4.8 series (Latest: 4.8.1-tdm-2 - 2013-10-06)  (Read 71377 times)

Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
TDM-GCC 4.8 series (Latest: 4.8.1-tdm-2 - 2013-10-06)
« on: September 29, 2013, 12:36:18 am »
I've released new packages that should fix the drive-not-present errors, as well as the LTO error. No fix yet for the DW2 EXE-to-DLL exception bug.



For those of you who have patiently waited more than a year since the previous TDM-GCC release, your wait is over. I'm pleased to present:

TDM-GCC 4.8.1
This release includes out-of-the-box DLL-free std::thread support, 64-bit Ada support, and the usual slew of GCC improvements.

TDM-GCC 4.8.1, the first TDM release in the GCC 4.8 series, is now available for download. As always, I've tested it on wxWidgets (2.8.12) and Code::Blocks SVN (9368) to ensure good compatibility. You can build Code::Blocks with either the TDM32 edition ("out of the box"), or the TDM64 edition (using the MinGW-w64 project's runtime and the "-m32" flag for 32-bit compilation). When building wxWidgets as a MONOLITHIC DLL, you will probably need to use the "-fno-keep-inline-dllexport" flag (mingw32-make ... CXXFLAGS="-fno-keep-inline-dllexport").

Some TDM-specific changes since the last release:
  • TDM-GCC now uses POSIX-style threads in its runtime libraries by way of the MinGW-w64 "winpthreads" layer. This allows std::thread and other C++11 pthreads-based features to be used.
  • TDM-GCC's version of winpthreads is patched for fully static use, so you won't be distributing an additional pthreads DLL with your programs. The patch gives winpthreads the ability to share thread handles among DLLs and EXEs.
  • By popular request, the "-static-libstdc++" option is back. It doesn't do anything, because TDM-GCC uses a static libstdc++ by default and you have to use "-shared-libstdc++" to get the DLL version, but it doesn't cause a compile-time error anymore.
  • By dint of some upstream work and some TDM-GCC-specific hacking, the Ada language is finally available for the TDM64 edition (32-bit or 64-bit compilation).

TDM-GCC comes in TWO editions:
You can choose between the classic TDM 32-bit edition and the TDM64 edition. The TDM64 edition is based on the MinGW-w64 runtime API and the x86_64-w64-mingw32 GCC target, and can create both 32-bit and 64-bit code, with the "-m32"/"-m64" compiler flags. Please be aware, if you build Code::Blocks yourself, that it only works as 32-bit code ("-m32") on Windows, currently -- though that will hopefully change soon. Also, please never mix 32-bit object files (.o), libraries (.a), DLLs, or EXEs with 64-bit versions, and don't report it as a bug if you inadvertently do.

More information and downloads are available at <http://tdm-gcc.tdragon.net/>. TDM-GCC includes support for C, C++, Fortran, Objective-C/C++, and Ada, as well as support for the OpenMP multithreading extensions, packaged in a simple Windows installer.

Disclaimer:
As always, please remember:
  • TDM-GCC is not formally affiliated with or endorsed by the MinGW project.
  • No level of support for TDM-GCC is in any way guaranteed (although a best effort is made to fix bugs as they are found or forward them to GCC Bugzilla).

Cheers,
John E. / TDM
« Last Edit: October 07, 2013, 06:12:07 pm by TDragon »
https://jmeubank.github.io/tdm-gcc/ - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: TDM-GCC 4.8 series (Latest: 4.8.1 - 2013-09-28)
« Reply #1 on: September 29, 2013, 04:15:49 am »
Hi, John, thank you for the good work, I'm going to try your 32 bit dw2 edition now.

BTW, I just create a windows batch script to name all the *-dw2.exe files (strip the -dw2), hope that is useful for someone.
Code
Setlocal EnableDelayedExpansion
for /f  %%i in ('dir /b *-dw2.exe') do (
set name=%%i
set name=!name:-dw2=!
ren %%i !name!
)
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: TDM-GCC 4.8 series (Latest: 4.8.1 - 2013-09-28)
« Reply #2 on: September 29, 2013, 02:46:33 pm »
For those of you who have patiently waited ...
That includes me then... ;-)

Its always like x-mas if I read posts like this. Thank you once again, John!

...and nice new webpage design, btw...
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline gd_on

  • Lives here!
  • ****
  • Posts: 796
Re: TDM-GCC 4.8 series (Latest: 4.8.1 - 2013-09-28)
« Reply #3 on: September 29, 2013, 03:28:44 pm »
Thanks,
nevertheless I have a problem that I don't understand :
When I simply launch CB I obtain error messages like this one (here translated from French) :
mingw32-gcc.exe - No disk
There are no disk in the drive. Insert a disk in \Device\Harddisk4\DR4

and

x86_64-w64-mingw32-gcc.exe - No disk
There are no disk in the drive. Insert a disk in \Device\Harddisk4\DR4

If I load a project and try to compile it, I obtain the same messages at each mingw32 call.
If I click on ignore the message, the project is compiled correctly, but it becomes annoying when you have a big project with many calls to mingw32 (CB for example !).

What could be the problem ?

If I revert to 4.71 version, all is OK again.

gd_on
Windows 11 64 bits (23H2), svn C::B (last version or almost!), wxWidgets 3.2.4 (tests with 3.3), Msys2 Compilers 13.2.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\msys64\mingw64) or 32 bits (dwarf2, posix  in C:\msys64\mingw32).

Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Re: TDM-GCC 4.8 series (Latest: 4.8.1 - 2013-09-28)
« Reply #4 on: September 29, 2013, 03:38:56 pm »
Hi gd_on,

Can you see if it's possible to add the "-v" option to your command line and show me the output? I'd just like to see the command line output of compiling *one* file with that option, when it produces these error screens for you.
https://jmeubank.github.io/tdm-gcc/ - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

Offline gd_on

  • Lives here!
  • ****
  • Posts: 796
Re: TDM-GCC 4.8 series (Latest: 4.8.1 - 2013-09-28)
« Reply #5 on: September 29, 2013, 04:00:28 pm »
Here is the output for a simple hello program in C and with gcc 4.71
Code
-------------- Clean: Release in Hello_cpp (compiler: GNU GCC Compiler)---------------

Cleaned "Hello_cpp - Release"

-------------- Build: Release in Hello_cpp (compiler: GNU GCC Compiler)---------------

mingw32-g++.exe -Wall -pedantic-errors -v  -c C:\Users\Gerard_2\Documents\Programmes_en_C\CodeBlocks\Hello_Cpp\Hello_cpp.cpp -o obj\Release\Hello_cpp.o
mingw32-g++.exe  -o bin\Release\Hello_cpp.exe obj\Release\Hello_cpp.o   
Using built-in specs.
COLLECT_GCC=mingw32-g++.exe
Target: mingw32
Configured with: ../../src/gcc-4.7.1/configure --build=mingw32 --enable-languages=c,c++,ada,fortran,objc,obj-c++ --enable-threads=win32 --enable-libgomp --enable-lto --enable-fully-dynamic-string --enable-libstdcxx-debug --enable-version-specific-runtime-libs --with-gnu-ld --disable-nls --disable-win32-registry --disable-symvers --disable-build-poststage1-with-cxx --disable-werror --prefix=/mingw32tdm --with-local-prefix=/mingw32tdm --enable-cxx-flags='-fno-function-sections -fno-data-sections' --with-pkgversion=tdm-1 --enable-sjlj-exceptions --with-bugurl=http://tdm-gcc.tdragon.net/bugs
Thread model: win32
gcc version 4.7.1 (tdm-1)
COLLECT_GCC_OPTIONS='-Wall' '-pedantic-errors' '-v' '-c' '-o' 'obj\Release\Hello_cpp.o' '-mtune=i386' '-march=i386'
 c:/mingw32/bin/../libexec/gcc/mingw32/4.7.1/cc1plus.exe -quiet -v -iprefix c:\mingw32\bin\../lib/gcc/mingw32/4.7.1/ C:\Users\Gerard_2\Documents\Programmes_en_C\CodeBlocks\Hello_Cpp\Hello_cpp.cpp -quiet -dumpbase Hello_cpp.cpp -mtune=i386 -march=i386 -auxbase-strip obj\Release\Hello_cpp.o -Wall -pedantic-errors -version -o C:\Users\Gerard_2\AppData\Local\Temp\ccQneD7x.s
GNU C++ (tdm-1) version 4.7.1 (mingw32)
compiled by GNU C version 4.7.1, GMP version 4.3.2, MPFR version 2.4.2, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory "c:\mingw32\bin\../lib/gcc/mingw32/4.7.1/../../../../mingw32/include"
ignoring duplicate directory "c:/mingw32/lib/gcc/../../lib/gcc/mingw32/4.7.1/include/c++"
ignoring duplicate directory "c:/mingw32/lib/gcc/../../lib/gcc/mingw32/4.7.1/include/c++/mingw32"
ignoring duplicate directory "c:/mingw32/lib/gcc/../../lib/gcc/mingw32/4.7.1/include/c++/backward"
ignoring duplicate directory "c:/mingw32/lib/gcc/../../lib/gcc/mingw32/4.7.1/include"
ignoring duplicate directory "c:/mingw32/lib/gcc/../../lib/gcc/mingw32/4.7.1/../../../../include"
ignoring duplicate directory "c:/mingw32/lib/gcc/../../lib/gcc/mingw32/4.7.1/include-fixed"
ignoring nonexistent directory "c:/mingw32/lib/gcc/../../lib/gcc/mingw32/4.7.1/../../../../mingw32/include"
#include "..." search starts here:
#include <...> search starts here:
 c:\mingw32\bin\../lib/gcc/mingw32/4.7.1/include/c++
 c:\mingw32\bin\../lib/gcc/mingw32/4.7.1/include/c++/mingw32
 c:\mingw32\bin\../lib/gcc/mingw32/4.7.1/include/c++/backward
 c:\mingw32\bin\../lib/gcc/mingw32/4.7.1/include
 c:\mingw32\bin\../lib/gcc/mingw32/4.7.1/../../../../include
 c:\mingw32\bin\../lib/gcc/mingw32/4.7.1/include-fixed
End of search list.
GNU C++ (tdm-1) version 4.7.1 (mingw32)
compiled by GNU C version 4.7.1, GMP version 4.3.2, MPFR version 2.4.2, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 1b05afeca9d712f769248af52f554d5e
COLLECT_GCC_OPTIONS='-Wall' '-pedantic-errors' '-v' '-c' '-o' 'obj\Release\Hello_cpp.o' '-mtune=i386' '-march=i386'
 c:/mingw32/bin/../lib/gcc/mingw32/4.7.1/../../../../mingw32/bin/as.exe -v -o obj\Release\Hello_cpp.o C:\Users\Gerard_2\AppData\Local\Temp\ccQneD7x.s
GNU assembler version 2.22 (mingw32) using BFD version (GNU Binutils) 2.22
COMPILER_PATH=c:/mingw32/bin/../libexec/gcc/mingw32/4.7.1/;c:/mingw32/bin/../libexec/gcc/;c:/mingw32/bin/../lib/gcc/mingw32/4.7.1/../../../../mingw32/bin/
LIBRARY_PATH=c:/mingw32/bin/../lib/gcc/mingw32/4.7.1/;c:/mingw32/bin/../lib/gcc/;c:/mingw32/bin/../lib/gcc/mingw32/4.7.1/../../../../mingw32/lib/;c:/mingw32/bin/../lib/gcc/mingw32/4.7.1/../../../
COLLECT_GCC_OPTIONS='-Wall' '-pedantic-errors' '-v' '-c' '-o' 'obj\Release\Hello_cpp.o' '-mtune=i386' '-march=i386'
Output file is bin\Release\Hello_cpp.exe with size 934.66 KB
Process terminated with status 0 (0 minute(s), 0 second(s))
0 error(s), 0 warning(s) (0 minute(s), 0 second(s))
 
The same one for a compilation with gcc 4.81
Code
-------------- Clean: Release in Hello_cpp (compiler: GNU GCC Compiler)---------------

Cleaned "Hello_cpp - Release"

-------------- Build: Release in Hello_cpp (compiler: GNU GCC Compiler)---------------

mingw32-g++.exe -Wall -pedantic-errors -v  -c C:\Users\Gerard_2\Documents\Programmes_en_C\CodeBlocks\Hello_Cpp\Hello_cpp.cpp -o obj\Release\Hello_cpp.o
mingw32-g++.exe  -o bin\Release\Hello_cpp.exe obj\Release\Hello_cpp.o   
Using built-in specs.
COLLECT_GCC=mingw32-g++.exe
Target: mingw32
Configured with: ../../../src/gcc-4.8.1/configure --build=mingw32 --enable-languages=ada,c,c++,fortran,lto,objc,obj-c++ --enable-libgomp --enable-lto --enable-graphite --enable-libstdcxx-debug --enable-threads=posix --enable-version-specific-runtime-libs --enable-fully-dynamic-string --enable-libstdcxx-threads --enable-libstdcxx-time --with-gnu-ld --disable-werror --disable-nls --disable-win32-registry --disable-symvers --enable-cxx-flags='-fno-function-sections -fno-data-sections -DWINPTHREAD_STATIC' --prefix=/mingw32tdm --with-local-prefix=/mingw32tdm --with-pkgversion=tdm-1 --enable-sjlj-exceptions --with-bugurl=http://tdm-gcc.tdragon.net/bugs
Thread model: posix
gcc version 4.8.1 (tdm-1)
COLLECT_GCC_OPTIONS='-Wall' '-pedantic-errors' '-v' '-c' '-o' 'obj\Release\Hello_cpp.o' '-mtune=generic' '-march=pentiumpro'
 c:/mingw32/bin/../libexec/gcc/mingw32/4.8.1/cc1plus.exe -quiet -v -iprefix c:\mingw32\bin\../lib/gcc/mingw32/4.8.1/ -D_REENTRANT C:\Users\Gerard_2\Documents\Programmes_en_C\CodeBlocks\Hello_Cpp\Hello_cpp.cpp -quiet -dumpbase Hello_cpp.cpp -mtune=generic -march=pentiumpro -auxbase-strip obj\Release\Hello_cpp.o -Wall -pedantic-errors -version -o C:\Users\Gerard_2\AppData\Local\Temp\cccD6LPn.s
GNU C++ (tdm-1) version 4.8.1 (mingw32)
compiled by GNU C version 4.8.1, GMP version 4.3.2, MPFR version 2.4.2, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring duplicate directory "c:/mingw32/lib/gcc/../../lib/gcc/mingw32/4.8.1/include/c++"
ignoring duplicate directory "c:/mingw32/lib/gcc/../../lib/gcc/mingw32/4.8.1/include/c++/mingw32"
ignoring duplicate directory "c:/mingw32/lib/gcc/../../lib/gcc/mingw32/4.8.1/include/c++/backward"
ignoring duplicate directory "c:/mingw32/lib/gcc/../../lib/gcc/mingw32/4.8.1/include"
ignoring duplicate directory "c:/mingw32/lib/gcc/../../lib/gcc/mingw32/4.8.1/../../../../include"
ignoring duplicate directory "c:/mingw32/lib/gcc/../../lib/gcc/mingw32/4.8.1/include-fixed"
ignoring duplicate directory "c:/mingw32/lib/gcc/../../lib/gcc/mingw32/4.8.1/../../../../mingw32/include"
ignoring nonexistent directory "/mingw/include"
#include "..." search starts here:
#include <...> search starts here:
 c:\mingw32\bin\../lib/gcc/mingw32/4.8.1/include/c++
 c:\mingw32\bin\../lib/gcc/mingw32/4.8.1/include/c++/mingw32
 c:\mingw32\bin\../lib/gcc/mingw32/4.8.1/include/c++/backward
 c:\mingw32\bin\../lib/gcc/mingw32/4.8.1/include
 c:\mingw32\bin\../lib/gcc/mingw32/4.8.1/../../../../include
 c:\mingw32\bin\../lib/gcc/mingw32/4.8.1/include-fixed
 c:\mingw32\bin\../lib/gcc/mingw32/4.8.1/../../../../mingw32/include
End of search list.
GNU C++ (tdm-1) version 4.8.1 (mingw32)
compiled by GNU C version 4.8.1, GMP version 4.3.2, MPFR version 2.4.2, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: ba981bdc3051a3f4991ef8e215402d9d
COLLECT_GCC_OPTIONS='-Wall' '-pedantic-errors' '-v' '-c' '-o' 'obj\Release\Hello_cpp.o' '-mtune=generic' '-march=pentiumpro'
 c:/mingw32/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/as.exe -v -o obj\Release\Hello_cpp.o C:\Users\Gerard_2\AppData\Local\Temp\cccD6LPn.s
GNU assembler version 2.23.1 (mingw32) using BFD version (GNU Binutils) 2.23.1
COMPILER_PATH=c:/mingw32/bin/../libexec/gcc/mingw32/4.8.1/;c:/mingw32/bin/../libexec/gcc/;c:/mingw32/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/
LIBRARY_PATH=c:/mingw32/bin/../lib/gcc/mingw32/4.8.1/;c:/mingw32/bin/../lib/gcc/;c:/mingw32/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/lib/;c:/mingw32/bin/../lib/gcc/mingw32/4.8.1/../../../
COLLECT_GCC_OPTIONS='-Wall' '-pedantic-errors' '-v' '-c' '-o' 'obj\Release\Hello_cpp.o' '-mtune=generic' '-march=pentiumpro'
Output file is bin\Release\Hello_cpp.exe with size 1.14 MB
Process terminated with status 0 (0 minute(s), 11 second(s))
0 error(s), 0 warning(s) (0 minute(s), 11 second(s))
 

Thanks

gd_on
Windows 11 64 bits (23H2), svn C::B (last version or almost!), wxWidgets 3.2.4 (tests with 3.3), Msys2 Compilers 13.2.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\msys64\mingw64) or 32 bits (dwarf2, posix  in C:\msys64\mingw32).

Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Re: TDM-GCC 4.8 series (Latest: 4.8.1 - 2013-09-28)
« Reply #6 on: September 29, 2013, 05:26:18 pm »
The problem could be related to the include search path "/mingw/include" which was missed for relocation, though I can't see why it would lead to Windows referencing an offline drive. I will release new packages in a day or two that get rid of that unrelocated path, but I don't know for sure if it will fix this problem.
https://jmeubank.github.io/tdm-gcc/ - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: TDM-GCC 4.8 series (Latest: 4.8.1 - 2013-09-28)
« Reply #7 on: September 29, 2013, 05:51:32 pm »
The problem could be related to the include search path "/mingw/include" which was missed for relocation, though I can't see why it would lead to Windows referencing an offline drive. I will release new packages in a day or two that get rid of that unrelocated path, but I don't know for sure if it will fix this problem.

An really only version on MinGW had this issue; is it possible it was looking in an older version of MinGW that has this bug.
It was one of the 3.4.x versions of MinGW with this or a closely related bug.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: TDM-GCC 4.8 series (Latest: 4.8.1 - 2013-09-28)
« Reply #8 on: September 29, 2013, 06:02:38 pm »
I got a question myself, too:

Did you (or anyone else in this forum) try to compile wx 2.8.12 with this version?
I get tons of errors, starting with:
../../src/msw/treectrl.cpp:2581:17: error: 'NMTVDISPINFOWW' was not declared in this scope
                 TV_DISPINFO *info = (TV_DISPINFO *)lParam;

...and thats it. Additionally the build log is flooded with deprecated warnings concerning win API headers.

No wx -> no C::B with this version. I wonder how gd_on managed to be able to compile C::b already...?!
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline gd_on

  • Lives here!
  • ****
  • Posts: 796
Re: TDM-GCC 4.8 series (Latest: 4.8.1 - 2013-09-28)
« Reply #9 on: September 29, 2013, 07:01:26 pm »
Code
No wx -> no C::B with this version. I wonder how gd_on managed to be able to compile C::b already...?!
No, I haven't compiled C::B already! I just tried to, but aborted because need a click each time mingw-gcc is invoked !

And I have not even tried to compile wx 2.8.12, so ... probably a source for future problems, but I was prepared to...

gd_on
« Last Edit: September 29, 2013, 07:03:23 pm by gd_on »
Windows 11 64 bits (23H2), svn C::B (last version or almost!), wxWidgets 3.2.4 (tests with 3.3), Msys2 Compilers 13.2.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\msys64\mingw64) or 32 bits (dwarf2, posix  in C:\msys64\mingw32).

Offline gd_on

  • Lives here!
  • ****
  • Posts: 796
Re: TDM-GCC 4.8 series (Latest: 4.8.1 - 2013-09-28)
« Reply #10 on: September 29, 2013, 07:13:25 pm »
And another thing, not related to the previous problem, and not related to C::B, but more to tdm gfortran.
I tried to detect in a fortran program if it's compiled in 32 or 64 bits.
On your previous site, you said we could use conditional compilation. I tried such a code :
Code
      PROGRAM hello

! Does not work ?
#ifdef _WIN32
#ifdef _WIN64
        print *, "Windows 64 bits compiler"
#else
        print *, "Windows 32 bits compiler"
#endif
#endif

      print *, "hello there Does this program work"

      END

using -cpp during compilation to activate preprocessing.
But it does not work.
I remember that you said on your previous site version that those environment variables where set if you compile with 32 and/or 64 bit compiler. But I have not found this on your new design.
Do I miss something here too ?
It's not special to 4.81 version, was already there with 4.71.

gd_on
Windows 11 64 bits (23H2), svn C::B (last version or almost!), wxWidgets 3.2.4 (tests with 3.3), Msys2 Compilers 13.2.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\msys64\mingw64) or 32 bits (dwarf2, posix  in C:\msys64\mingw32).

Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Re: TDM-GCC 4.8 series (Latest: 4.8.1 - 2013-09-28)
« Reply #11 on: September 29, 2013, 08:21:12 pm »
As of now, the installers have been reverted to use the older stable releases of w32api (3.17-2) and mingwrt (3.20-2) until MinGW.org releases fixed versions.



Did you (or anyone else in this forum) try to compile wx 2.8.12 with this version?
I get tons of errors, starting with:
../../src/msw/treectrl.cpp:2581:17: error: 'NMTVDISPINFOWW' was not declared in this scope
                 TV_DISPINFO *info = (TV_DISPINFO *)lParam;

...and thats it. Additionally the build log is flooded with deprecated warnings concerning win API headers.

My bad. I built wxWidgets and Code::Blocks with TDM-GCC 4.8.1 and MinGW.org's w32api-3.17, but released with MinGW.org's w32api-4.0.3 instead without testing it. I'll revert the installers in a little bit, which should fix this problem. (Users who installed before I revert will need to run the installer and intentionally select the older mingw-rt and w32api versions; it won't select them for you because it will detect them as being older versions, which they are.)
« Last Edit: September 29, 2013, 08:50:31 pm by TDragon »
https://jmeubank.github.io/tdm-gcc/ - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Re: TDM-GCC 4.8 series (Latest: 4.8.1 - 2013-09-28)
« Reply #12 on: September 29, 2013, 08:26:07 pm »
And another thing, not related to the previous problem, and not related to C::B, but more to tdm gfortran.
I tried to detect in a fortran program if it's compiled in 32 or 64 bits.

Sorry, I don't know much about compiling with GFortran. Apparently it doesn't define those particular macros.

Quote
I remember that you said on your previous site version that those environment variables where set if you compile with 32 and/or 64 bit compiler. But I have not found this on your new design.

I judged this information was no longer relevant enough to post on the site. You can dump a listing of predefined macros with the following command:
gcc -dM -E - <nul
Tack on flags after the "gcc" if you want to see how they affect it.
https://jmeubank.github.io/tdm-gcc/ - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: TDM-GCC 4.8 series (Latest: 4.8.1 - 2013-09-28)
« Reply #13 on: September 30, 2013, 03:09:50 am »
The information below gives some hint on how to choose sjlj or dw2 version of TDM-GCC when building wxWidgets lbirary.

I read a blog from VZ (a wxWidgets developer), http://wxwidgets.blogspot.com/2011/06/choosing-gcc-for-building-wxwidgets.html
Quote
And second, MinGW64 uses the so-called SJLJ exceptions which can propagate through the code not compiled with gcc, e.g. all Windows system DLLs. And in practice this is needed to be able to catch any exceptions thrown by your wxWidgets event handlers. So while DW2 exceptions used by MinGW version do have their advantages (in particular they are much more speed-efficient), SJLJ ones are preferable for wxWidgets GUI applications.
So, he suggest using SJLJ edition.

Here is my testing result of how c++ exception works under wx, the sample is under  \wxWidgets-2.8.12\samples\except, see image below


Condition: wx lib build from TDM-GCC 4.8.1 dw2  ---> Result: crash on any c++ exception from event handler (the crash also happens in wx lib build from PCX-GCC 4.6.3 dw2), see image below:

Condition: wx lib build from TDM-GCC 4.7.1 sjlj  ---> Result: exception can catch correctly, no crash, see image below:


I have not tried TDM-GCC 4.8.1 sjlj, I think it is the same as TDM-GCC 4.7.1 sjlj.

BTW: I can successfully build wx 2.8.12 with TDM-GCC 4.8.1 dw2. (I have use the tdm-gcc-webdl.exe, you should to down grade the mingw crt to stable version)

EDIT: it looks like wxWidgets' sample excep program should work for all kinds of exception models GCCs (both sjlj and dw2), because there are no exceptions cross  non-mingw stack, so I suspect it is a bug in TDM-GCC, see this post for details.



« Last Edit: September 30, 2013, 05:41:44 pm by ollydbg »
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline gd_on

  • Lives here!
  • ****
  • Posts: 796
Re: TDM-GCC 4.8 series (Latest: 4.8.1 - 2013-09-28)
« Reply #14 on: September 30, 2013, 04:12:46 pm »
On a PC at work, I have finally been able to compile C::B with tdm 4.81 gcc ;). On this PC I have not the problem of "mingw32-gcc.exe - No disk; There are no disk in the drive. Insert a disk in \Device\Harddisk4\DR4", that I met on my own PC, at home  >:(!
I use also the last updated tdm version with winapi 3.17.
Nevertheless, I have made a small modification within wxWidgets 2.8.12, because compile time was too huge, due to apparently the back tracking of a warning: there were so many warnings that after 4 hours of messages :o, I decided to stop compilation and tried to find a workaround. I had tons of messages like this one:
Code
C:\wxWidgets-2.8.12\include/wx/debug.h:194:43: warning: typedef 'wxDummyCheckInt' locally defined but not used [-Wunused-local-typedefs]
     #define wxFORCE_SEMICOLON typedef int wxDummyCheckInt
                                           ^
C:\wxWidgets-2.8.12\include/wx/debug.h:224:9: note: in expansion of macro 'wxFORCE_SEMICOLON'
         wxFORCE_SEMICOLON /* just to force a semicolon */
         ^
C:\wxWidgets-2.8.12\include/wx/debug.h:233:38: note: in expansion of macro 'wxCHECK2_MSG'
 #define wxCHECK_RET(cond, msg)       wxCHECK2_MSG(cond, return, msg)
                                      ^
C:\wxWidgets-2.8.12\include/wx/buffer.h:289:9: note: in expansion of macro 'wxCHECK_RET'
         wxCHECK_RET( m_bufdata->m_data, wxT("invalid wxMemoryBuffer") );
         ^
.....
in my C:\wxWidgets-2.8.12\include\wx folder, I have modified line 194 in debug.h:
original code:
Code
#define wxFORCE_SEMICOLON typedef int wxDummyCheckInt
replaced by:
Code
#define wxFORCE_SEMICOLON struct wxDummyCheckStruct /*typedef int wxDummyCheckInt*/
This is just a hack, because like that it's the same code for gnu and non-gnu gcc compilers, but it works.
Like that, I have been able to compile wxWidget 2.8.12 with gcc 4.8.1, with largely less warnings that without my hack (there are still a few ones!).
And build a new C::B version with gcc 4.81 too (in a few minutes, as usual).
I was not totally sure it will work because of the chicken and egg problem: who is the first?
Effectively, my old version of C::B was compiled with tdm 4.71, my new wxWidgets libraries and dll were compiled with gcc 4.81. But after some tries, it's OK.
Certainly, the order in which you build wxWidgets and intermediate C::B versions is important, because at certain step I had mixed things between 4.71 and 4.81 versions.

If this can help ...


gd_on

[attachment deleted by admin]
« Last Edit: September 30, 2013, 04:28:25 pm by gd_on »
Windows 11 64 bits (23H2), svn C::B (last version or almost!), wxWidgets 3.2.4 (tests with 3.3), Msys2 Compilers 13.2.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\msys64\mingw64) or 32 bits (dwarf2, posix  in C:\msys64\mingw32).