codeblock + wxwidgets "undefined reference" error  [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.
DanielLuo
In need of some credit
In need of some credit
Posts: 3
Joined: Thu Mar 22, 2018 10:17 am

codeblock + wxwidgets "undefined reference" error

Postby DanielLuo » Thu Mar 22, 2018 10:49 am

OS:Windows 7
compiler:gcc 5.1 (tdm-1)

My English is poor.I hope you can understand what i mean.

I want to develop cross platform software with wxwidgets.So I download wxwodgets3.0.4 from offical website. And I build it with gcc 5.1(TDM-1) which be included in codeblocks 17.12.

Command:

Code: Select all

mingw32-make -f makefile.gcc BUILD=release SHARED=0 UNICODE=1


Then I create a wxwidgets3.0.x project in codeblocks and set the wxwidgets path.Finally I compile the project without any modification.But I got some error.

223337_IqXG_2346522.png
223337_IqXG_2346522.png (60.79 KiB) Viewed 445 times


What should i do??
Should i compile wxwidgets against??
Please tell me how to solve this problem.
Thank you

User avatar
T-Rex
Moderator
Moderator
Posts: 1164
Joined: Sat Oct 23, 2004 9:58 am
Location: Zaporizhzhya, Ukraine
Contact:

Re: codeblock + wxwidgets "undefined reference" error  [SOLVED]

Postby T-Rex » Thu Mar 22, 2018 10:53 am

You probably need to add the wxWidgets JPEG library (the exact name may vary depending on your setup, should be something with `wxjpeg` in the file name) after all other wxWidgets libraries in the list of additional dependencies in your project's linker settings.

DanielLuo
In need of some credit
In need of some credit
Posts: 3
Joined: Thu Mar 22, 2018 10:17 am

Re: codeblock + wxwidgets "undefined reference" error

Postby DanielLuo » Sat Mar 24, 2018 9:13 am

T-Rex wrote:You probably need to add the wxWidgets JPEG library (the exact name may vary depending on your setup, should be something with `wxjpeg` in the file name) after all other wxWidgets libraries in the list of additional dependencies in your project's linker settings.

As what you say,There is a file named "libwxjpeg.a".I add the file in linker settings and it works!!Thank you!! :D


Return to “Compiler / Linking / IDE Related”

Who is online

Users browsing this forum: No registered users and 8 guests