Author Topic: Help with Configuring Codeblocks to use standalone wxWidgets build on Linux  (Read 151 times)

Offline Engerek01

  • Single posting newcomer
  • *
  • Posts: 1
Hello everyone. I am new to the forums of CB so my apologies in advance if I am breaking any rules.

I am using the latest version of CB (17.12) on Linux Mint 19.3 I built a static build of wxWidgets and I am trying to make CB see it. On windows it was easily done with Global variables. However, setting global variables on Linux didn't seem to have any effect.

What I did is download the wxWidgets source code and...

Code: [Select]
cd (path)wxWidgets-3.0.x
mkdir gtk-static-build
cd gtk-static-build
../configure --enable-unicode --disable-shared --prefix=$(pwd)
make

According to the guide https://wiki.wxwidgets.org/Compiling_and_getting_started. It says that if I use the $(pwd) prefix, I don't need to "make install". After that, I followed the guide and used the command "make" on a few samples which successfully created the executables with static libraries (I can tell because of the size and they work on other linux pcs).

I noticed that makefiles involve those
Code: [Select]
prefix = /home/engerek01/workspaces/wxWidgets-3.0.4/gtk-static-build
BK_DEPS = /home/engerek01/workspaces/wxWidgets-3.0.4/gtk-static-build/bk-deps
wx_top_builddir = /home/engerek01/workspaces/wxWidgets-3.0.4/gtk-static-build


MY QUESTION IS: How can I make codeblocks see that wxWidgets static build? Global Variables didn't work and I feel like it should be as simple as adding
Code: [Select]
'wx-config --prefix="/home/engerek01/workspaces/wxWidgets-3.0.4/gtk-static-build/lib/wx/config" --cflags'  or
Code: [Select]
--with-wx-config="/home/engerek01/workspaces/wxWidgets-3.0.4/gtk-static-build" somewhere.

Note that I had also installed the wxWidgets packages but they seem to provide only dynamic libraries. I can successfully create my applications on Codeblocks that way.

I also dual-boot to Windows 10 and I did something similar there. Downloaded wxWidgets source code for windows and built it myself dynamically. And then directing the wx global variable to that directory worked perfectly.

I've been googling trying to make this work for 2 weeks now. Any suggestion is hugely appreciated :)

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6765
    • My Best Post
Did you try adding to "other compiler options"?
Code: [Select]
`wx-config --prefix="/home/engerek01/workspaces/wxWidgets-3.0.4/gtk-static-build" --cflags`
NOTE: The use of slanted single quotes.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org