Compiling Error

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
wxHuman
Earned a small fee
Earned a small fee
Posts: 22
Joined: Sat Dec 14, 2013 5:37 pm

Compiling Error

Post by wxHuman »

Hi,
I don't know if this is related to wxWidgets. Today I changed my GCC from 5 to 9, and when I tried to compile my software I got some strange error. Which is out of my knowledge.

Code: Select all

C:/TDM-GCC-32/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:/TDM-GCC-32/bin/../lib/gcc/mingw32/9.2.0\libstdc++.a(bad_alloc.o):bad_alloc.cc:(.text+0x10): multiple definition of `std::bad_alloc::~bad_alloc()'; C:/TDM-GCC-32/bin/../lib/gcc/mingw32/9.2.0/libstdc++.dll.a(d005218.o):(.text+0x0): first defined here
C:/TDM-GCC-32/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:/TDM-GCC-32/bin/../lib/gcc/mingw32/9.2.0\libstdc++.a(eh_exception.o):eh_exception.cc:(.text+0x0): multiple definition of `std::exception::~exception()'; C:/TDM-GCC-32/bin/../lib/gcc/mingw32/9.2.0/libstdc++.dll.a(d005266.o):(.text+0x0): first defined here
collect2.exe: error: ld returned 1 exit status
Which GCC should I use to compile wxWidgets?

Thank you for giving me your time
Last edited by wxHuman on Thu Dec 10, 2020 10:17 am, edited 1 time in total.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7459
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Compiling Error

Post by ONEEYEMAN »

Hi,
Please don't post the links to the other website - post any errors here inline.
In terms of you compilation errors - what commands did you use for building wxWidgets and your software?

Please post here an exact commands verbatim.

Thank you.
stahta01
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 548
Joined: Fri Nov 03, 2006 2:00 pm

Re: Compiling Error

Post by stahta01 »

"multiple definition of" is usually related to the library that cause the error. In this case it looks to be an Compiler library.
So, the problem is very likely caused by the Compiler Toolchain you are using.

It has nothing to do with wxWidgets based on the error you posted on the other website.

Tim S.
wxHuman
Earned a small fee
Earned a small fee
Posts: 22
Joined: Sat Dec 14, 2013 5:37 pm

Re: Compiling Error

Post by wxHuman »

OK, thank you. I will change the compiler. Removing the link.
Manolo
Can't get richer than this
Can't get richer than this
Posts: 827
Joined: Mon Apr 30, 2012 11:07 pm

Re: Compiling Error

Post by Manolo »

When you change the compiler in most cases you must not only recompile your code, but the wx sources too.
wxHuman
Earned a small fee
Earned a small fee
Posts: 22
Joined: Sat Dec 14, 2013 5:37 pm

Re: Compiling Error

Post by wxHuman »

Yes and I changed the compiler, now it is compiling without any error.
Thank you.
Post Reply