News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

wxWidgets 3.1 in CodeBlocks error

Started by MBajor, October 08, 2019, 10:27:19 PM

Previous topic - Next topic

MBajor

Hi!
I want to use wxWidgets 3.1 in CodeBlocks 17.12. So I with success installed CodeBlocks 17.12 wxWidgets 3.1 and trying to add wxWidgets to CodeBlocks.
For this task I add `/usr/local/bin/wx-config --cxxflags` to Project --> Build Options --> Compiler flags --> General, right-click an item and select "New flag..." and ibid. `/usr/local/bin/wx-config --libs`
But when I try compiling simplest project not all change from 3.0 to 3.1
My Build log:
Quote
-------------- Clean: Debug in first31 (compiler: GNU GCC Compiler)---------------

Cleaned "first31 - Debug"

-------------- Build: Debug in first31 (compiler: GNU GCC Compiler)---------------

g++ -Wall -I/usr/local/lib/wx/include/gtk3-unicode-3.1 -I/usr/local/include/wx-3.1 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -L/usr/local/lib -pthread -lwx_gtk3u_xrc-3.1 -lwx_gtk3u_html-3.1 -lwx_gtk3u_qa-3.1 -lwx_gtk3u_core-3.1 -lwx_baseu_xml-3.1 -lwx_baseu_net-3.1 -lwx_baseu-3.1 -I/usr/lib/arm-linux-gnueabihf/wx/include/gtk2-unicode-3.0 -I/usr/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -g -I/usr/local/lib/wx/include/gtk3-unicode-3.1 -I/usr/local/include/wx-3.1 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread  -c /home/pi/user_server/first31/first31App.cpp -o obj/Debug/first31App.o
g++ -Wall -I/usr/local/lib/wx/include/gtk3-unicode-3.1 -I/usr/local/include/wx-3.1 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -L/usr/local/lib -pthread -lwx_gtk3u_xrc-3.1 -lwx_gtk3u_html-3.1 -lwx_gtk3u_qa-3.1 -lwx_gtk3u_core-3.1 -lwx_baseu_xml-3.1 -lwx_baseu_net-3.1 -lwx_baseu-3.1 -I/usr/lib/arm-linux-gnueabihf/wx/include/gtk2-unicode-3.0 -I/usr/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -g -I/usr/local/lib/wx/include/gtk3-unicode-3.1 -I/usr/local/include/wx-3.1 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread  -c /home/pi/user_server/first31/first31Main.cpp -o obj/Debug/first31Main.o
g++  -o bin/Debug/first31 obj/Debug/first31App.o obj/Debug/first31Main.o  -L/usr/lib/arm-linux-gnueabihf -pthread   -lwx_gtk2u_xrc-3.0 -lwx_gtk2u_html-3.0 -lwx_gtk2u_qa-3.0 -lwx_gtk2u_adv-3.0 -lwx_gtk2u_core-3.0 -lwx_baseu_xml-3.0 -lwx_baseu_net-3.0 -lwx_baseu-3.0   /usr/local/lib/libwx_gtk3u_richtext-3.1.so /usr/local/lib/libwx_gtk3u_gl-3.1.so /usr/local/lib/libwx_gtk3u_stc-3.1.so
/usr/bin/ld: obj/Debug/first31Main.o: undefined reference to symbol '_ZN8wxWindow17EnableTouchEventsEi@@WXU_3.1'
//usr/local/lib/libwx_gtk3u_core-3.1.so.2: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 11 second(s))
2 error(s), 0 warning(s) (0 minute(s), 11 second(s))



My OS is Raspbian

stahta01


/usr/local/bin/wx-config --cxxflags


What does the above return when ran from the command line?

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

MBajor

/usr/local/bin/wx-config --cxxflags
Return
-I/usr/local/lib/wx/include/gtk3-unicode-3.1 -I/usr/local/include/wx-3.1 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread

BlueHazzard

1) Have you tried the project wizard to create a wxWidgets project? There should not be any work to do once the wizard completed

2) I think you have put the options in the wrong place:
Compiler options:
Project->Build options-> select the project name on the right->Compiler Settings->Other compiler options:
`/usr/local/bin/wx-config --cxxflags`
Linker options:
Project->Build options->select the project name on the right->Linker settings->Other linker options:
Quote`/usr/local/bin/wx-config --libs`

MBajor

Yes it is BlueHazzard i am put the options in the wrong place.
Thank BlueHazzard!
Thank stahta01!
Have a nice day.
Good luck.