Author Topic: TDM-GCC 4.5 series (Latest: 4.5.2 - 2011-03-27)  (Read 102158 times)

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: TDM-GCC 4.5 series (Latest: 4.5.1 & LTO support)
« Reply #75 on: September 03, 2010, 05:21:19 pm »
Thank you for failing to read --
  • the TDM-GCC README,
  • Code::Blocks documentation,
  • Code::Blocks' own compiler settings dialog, and
  • the error message right before your eyes!
You've really made my day.
Oh oh... I've not read those either...  *whistles* :)
Let's hope my above post isn't documented in these.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Re: TDM-GCC 4.5 series (Latest: 4.5.1 & LTO support)
« Reply #76 on: September 03, 2010, 07:49:09 pm »
The second, much more severe issue is that the linker chokes on classes that have inline virtual destructors, complaining about double definitions. It also seems to have issues with classes which are derived from a virtual base class that do not provide an instance of the virtual destructor. Adding an instance (in a source file) removes the problem.
I'll look into this if I get a chance.

Quote
By the way, is there a way to make windres a bit less stupid? It seems to have hardcoded gcc.exe in its guts and apparently cannot be convinced by any means to invoke anything different, which of course means that it will consistently fail if the binary is named gcc-dw2.exe, both when building wxWidgets and anything that uses resources otherwise.
If I'm right, windres only invokes gcc for preprocessing purposes, so you should be able to add --preprocessor="gcc-dw2 -E -xc -DRC_INVOKED" to the windres command line to fix this.
« Last Edit: September 03, 2010, 07:52:17 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 Phenom

  • Multiple posting newcomer
  • *
  • Posts: 57
Re: TDM-GCC 4.5 series (Latest: 4.5.1 & LTO support)
« Reply #77 on: September 04, 2010, 08:11:46 pm »
Hi, I was using TDM-GCC under Windows XP without problems. But recently I switched to Windows 7 and when I try to run an application compliled with TDM-GCC 4.5.0 I get that "libgcc_s_dw2-1.dll" is missing. Is this dll supposed to be installed with the compiler?

NOTE: Programms that were compiled with gcc 3.4.5 run normally.

How can I solve this issue?

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: TDM-GCC 4.5 series (Latest: 4.5.1 & LTO support)
« Reply #78 on: September 04, 2010, 08:51:15 pm »
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 Phenom

  • Multiple posting newcomer
  • *
  • Posts: 57
Re: TDM-GCC 4.5 series (Latest: 4.5.1 & LTO support)
« Reply #79 on: September 04, 2010, 09:12:46 pm »
I already have downloaded the missing file. But, what I wanted is to make my app run without it so I can distribute it without dlls.

Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Re: TDM-GCC 4.5 series (Latest: 4.5.1 & LTO support)
« Reply #80 on: September 04, 2010, 10:33:37 pm »
TDM-GCC does *not* create programs that rely on the libgcc DLL by default, so you are either
  • specifying "-shared-libgcc" on the command line, or
  • linking with code that was compiled with another version of GCC, or
  • using a different version of GCC, not TDM-GCC.

Make sure that no other version of GCC is being used -- especially, do *not* have an installation in C:\mingw (or D:\mingw, etc.), as that location is searched by default in every GCC installation!
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 Phenom

  • Multiple posting newcomer
  • *
  • Posts: 57
Re: TDM-GCC 4.5 series (Latest: 4.5.1 & LTO support)
« Reply #81 on: September 05, 2010, 11:52:43 am »
  • using a different version of GCC, not TDM-GCC.

You were right about that:
Code
gcc --version
gcc (GCC) 4.5.0
Copyright (C) 2010 Free Softwarre Foundation, Inc.
<License stuff>


I guess I messed things up during installation. Well, recompiling with the actual TDM-GCC will solve this, right?


Offline Phenom

  • Multiple posting newcomer
  • *
  • Posts: 57
Re: TDM-GCC 4.5 series (Latest: 4.5.1 & LTO support)
« Reply #82 on: September 05, 2010, 03:29:03 pm »
I successfully installed TDM-GCC 4.5.1 but I get link errors:
Code
obj\ZTimerManager.o:ZTimerManager.cpp:(.text+0xcd): undefined reference to `_Unwind_Resume'
obj\ZTimerManager.o:ZTimerManager.cpp:(.eh_frame+0x12): undefined reference to `__gxx_personality_v0

I found some solutions like linking with libstdc++, someone mentioned that "__gxx part indicates that this is a g++-specific implementation issue. The .eh_frame probably indicates that it is concerned with exception handling, code for which may be automatically inserted for C++ programs. If so, you could disable exceptions with a compiler flag or link in the proper symbols from a library that came with your compiler (perhaps libstdc++?) " but none of these work.

Is there a flag or option I shoud add?

« Last Edit: September 05, 2010, 03:35:51 pm by Phenom »

Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Re: TDM-GCC 4.5 series (Latest: 4.5.1 & LTO support)
« Reply #83 on: September 05, 2010, 04:48:27 pm »
Those link errors are from object files that were compiled with the other version of GCC. You need to recompile everything with the new version.
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 Phenom

  • Multiple posting newcomer
  • *
  • Posts: 57
Re: TDM-GCC 4.5 series (Latest: 4.5.1 & LTO support)
« Reply #84 on: September 05, 2010, 07:27:04 pm »
Those link errors are from object files that were compiled with the other version of GCC. You need to recompile everything with the new version.

I keep getting errors after rebuilding the whole project(though Build->Rebuild).


Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Re: TDM-GCC 4.5 series (Latest: 4.5.1 & LTO support)
« Reply #85 on: September 05, 2010, 09:39:32 pm »
Make sure that no other version of GCC is being used -- especially, do *not* have an installation in C:\mingw (or D:\mingw, etc.), as that location is searched by default in every GCC installation!
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 Phenom

  • Multiple posting newcomer
  • *
  • Posts: 57
Re: TDM-GCC 4.5 series (Latest: 4.5.1 & LTO support)
« Reply #86 on: September 06, 2010, 01:58:37 pm »
Those link errors are from object files that were compiled with the other version of GCC. You need to recompile everything with the new version.

I forgot to rebuild the libraries my program uses...
:D

Thanks for your help.


Offline nenin

  • Almost regular
  • **
  • Posts: 201
Re: TDM-GCC 4.5 series (Latest: 4.5.1 & LTO support)
« Reply #87 on: September 16, 2010, 07:22:10 pm »
Problem I reported here http://forums.codeblocks.org/index.php/topic,11055.msg77947.html#msg77947 not exists in 4.5.1-tdm-1 build.
Big thanks for TDragon. Nice job! 

Offline xunxun

  • Almost regular
  • **
  • Posts: 187
Re: TDM-GCC 4.5 series (Latest: 4.5.1 & LTO support)
« Reply #88 on: September 17, 2010, 08:58:17 am »
Can this edition compile wxWidgets dll now?
Regards,
xunxun

Offline reckless

  • Regular
  • ***
  • Posts: 338
Re: TDM-GCC 4.5 series (Latest: 4.5.1 & LTO support)
« Reply #89 on: September 17, 2010, 10:55:55 am »
should think so got fixed patchwise as early as 4.5.0 ;) leo and i use it not sure about john ?