codeblock + wxwidgets "undefined reference" error 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
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

Post by DanielLuo »

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 2110 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: 1248
Joined: Sat Oct 23, 2004 9:58 am
Location: Zaporizhzhya, Ukraine
Contact:

Re: codeblock + wxwidgets "undefined reference" error

Post by T-Rex »

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

Post by DanielLuo »

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
Post Reply