Author Topic: wxWidgets 3.1 in CodeBlocks error  (Read 2906 times)

Offline MBajor

  • Single posting newcomer
  • *
  • Posts: 8
wxWidgets 3.1 in CodeBlocks error
« on: October 08, 2019, 10:27:19 pm »
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

Online stahta01

  • Lives here!
  • ****
  • Posts: 7590
    • My Best Post
Re: wxWidgets 3.1 in CodeBlocks error
« Reply #1 on: October 08, 2019, 11:27:23 pm »
Code
/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++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline MBajor

  • Single posting newcomer
  • *
  • Posts: 8
Re: wxWidgets 3.1 in CodeBlocks error
« Reply #2 on: October 09, 2019, 05:14:03 am »
Code
/usr/local/bin/wx-config --cxxflags
Return
Code
-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

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: wxWidgets 3.1 in CodeBlocks error
« Reply #3 on: October 09, 2019, 02:01:32 pm »
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:
Code
`/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`

Offline MBajor

  • Single posting newcomer
  • *
  • Posts: 8
Re: wxWidgets 3.1 in CodeBlocks error
« Reply #4 on: October 09, 2019, 04:13:51 pm »
Yes it is BlueHazzard i am put the options in the wrong place.
Thank BlueHazzard!
Thank stahta01!
Have a nice day.
Good luck.