CodeBlock vs Codelite: undefined references Topic is solved

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
User avatar
Parduz
I live to help wx-kind
I live to help wx-kind
Posts: 193
Joined: Fri Jan 30, 2015 1:48 pm
Location: Bologna, Italy

CodeBlock vs Codelite: undefined references

Post by Parduz »

I need to migrate a project from CodeBlocks to Codelite.
In C:B it compiles (almost *) flawlessy, while in CL it generates a lot of undefined references.

I see how the problem arises here a lot, and i'm so sorry to ask about them again, but i really tried to get what's the difference between the two IDE linking commands and i can't get nothing out of it.
I managet that the libraries are AT LEAST the same (codeLite have more, as it calls wx-config while in CodeBlock they're setup manually in the project), and to make the options the same in the g++ command line... i'm really lost.

Here i've attached the VERY VERBOSE output of the g++ / ld commands of both the IDEs: is too much text to be pasted here and Pastebin thinks it's dangerous and does'nt allow me to paste there.
Linking LOG.zip
(24.06 KiB) Downloaded 62 times



* I have a warning from the resource compiler, that says there's a duplicate value inside
||warning: 24: 1: 1033: duplicate value|

win_resources.rc

Code: Select all

#include "wx/msw/wx.rc"
#ifdef WIN64
1 24 "wx/msw/amd64.manifest"
#else
1 24 "wx/msw/wx.manifest"
#endif
It is not harmful, but i'd like to avoid it.... what should i do? (i don't even know who generate that file).
User avatar
doublemax
Moderator
Moderator
Posts: 19159
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: CodeBlock vs Codelite: undefined references

Post by doublemax »

The missing references are from Windows libraries, e.g. GetThemePartSize is found in uxtheme.lib

The problem here is the order of libraries, which matter for MinGW (other than Visual C++). The library that contains a certain function must come after the library that requires that function.

In your codelite version "-luxtheme" should be after the wxWidgets libs, but it comes before.

The same goes for a few other libs.
Use the source, Luke!
Post Reply