Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: Engerek01 on January 27, 2020, 08:13:54 pm

Title: Help with Configuring Codeblocks to use standalone wxWidgets build on Linux
Post by: Engerek01 on January 27, 2020, 08:13:54 pm
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
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 (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
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
'wx-config --prefix="/home/engerek01/workspaces/wxWidgets-3.0.4/gtk-static-build/lib/wx/config" --cflags'
  or
Code
 --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 :)
Title: Re: Help with Configuring Codeblocks to use standalone wxWidgets build on Linux
Post by: stahta01 on January 28, 2020, 03:54:21 am
Did you try adding to "other compiler options"?
Code
`wx-config --prefix="/home/engerek01/workspaces/wxWidgets-3.0.4/gtk-static-build" --cflags`

NOTE: The use of slanted single quotes.

Tim S.
Title: Re:Error in creating wxWidgets project on Linux ubuntu 18.04
Post by: aaryan_91 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..

Title: Re: Help with Configuring Codeblocks to use standalone wxWidgets build on Linux
Post by: oBFusCATed on March 07, 2020, 12:39:41 am
Pass all deb files on the command line, so it can autoresolve the dependencies... Or start adding files until it stops complaining.
Title: Re: Help with Configuring Codeblocks to use standalone wxWidgets build on Linux
Post by: sodev on March 07, 2020, 07:04:08 am
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.