Author Topic: Help with Configuring Codeblocks to use standalone wxWidgets build on Linux  (Read 349 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: 6799
    • 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

Offline aaryan_91

  • Single posting newcomer
  • *
  • Posts: 1
    • InfosysGuru
Re:Error in creating wxWidgets project on Linux ubuntu 18.04
« Reply #2 on: March 05, 2020, 08:56:15 pm »
Hi, I am facing problem when creating wxWidgets project in CB 17.2-1.
It says"wxWidgets plugin not found can't create project"
and during installation of " codeblocks-contrib" also  error message shows, that msg has been attached.

Please help..

Thank you..


Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12340
    • Travis build status
Pass all deb files on the command line, so it can autoresolve the dependencies... Or start adding files until it stops complaining.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline sodev

  • Regular
  • ***
  • Posts: 362
He is not installing individual deb's so that shouldn't change anything. Looks more like a version conflict, as if there is a mix between packages from the distribution and custom made packages.

Any chance you added a custom repository for codeblocks? Try to remove all present codeblocks packages and try again.