Page 1 of 1

Environment Variables?

Posted: Wed Jan 06, 2021 4:47 pm
by root
I'm on Linux Mint 20. It comes standard with wxWidgets 3.0. I've installed 3.1.4 and can't figure out how to get CodeLite/wxCrafter to use it. I looked at the system environment variables and there's nothing in them for wxWidgets 3.0, as changing that, I figured, would be the simplest solution. So I'm still using 3.0 but would like to be using 3.1.4. Any help?

Re: Environment Variables?

Posted: Wed Jan 06, 2021 9:50 pm
by DavidGH
Hi,

Actually, the simplest solution is to edit the project's compiler and linker settings to point to /full/path/to/preferred/wx-config instead of just wx-config. But you could probably do something similar in either the global or the project's environment variables setting.

More generally, Mint is debian-derived and so has update-alternatives available. You can change the default wx by doing, in a terminal:
sudo update-alternatives --config wx-config
then following the instructions. Your project should then automatically use that wx version.

Regards,

David

Re: Environment Variables?

Posted: Thu Mar 18, 2021 11:27 am
by guyr
Back when I first started using CodeLite, I wanted to use a new version of WxWidgets than it was using. On Windows, the following changes in Settings-Environment Variables did the trick:

WXWIN=D:\Projects\wxWidgets\wxWidgets-3.1.1
WXCFG=gcc_dll\mswu
PATH=$(MINGW)\bin;$(WXWIN)\lib\gcc_dll;$(PATH)

I no longer need this since CodeLite has since incorporated a newer version of WxWidgets that is sufficient for my needs. But this example should help you make the necessary adjustments on your Linux system.

Re: Environment Variables?

Posted: Thu Apr 29, 2021 7:34 pm
by MeerMusik
guyr wrote: Thu Mar 18, 2021 11:27 am

Back when I first started using CodeLite, I wanted to use a new version of WxWidgets than it was using. On Windows, the following changes in Settings-Environment Variables did the trick:

WXWIN=D:\Projects\wxWidgets\wxWidgets-3.1.1
WXCFG=gcc_dll\mswu
PATH=$(MINGW)\bin;$(WXWIN)\lib\gcc_dll;$(PATH)

I no longer need this since CodeLite has since incorporated a newer version of WxWidgets that is sufficient for my needs. But this example should help you make the necessary adjustments on your Linux system.

For anyone running into this Problem:
Unfortunately this is a bad Idea if you have i.e. like me X86, X86_64, Debug, Release Directories. Unfortunately setting WXWIN and WXCFG gets ignored in the Workspace -> Settings -> Environment. I already created a Bug Report about this.

Another "Solution" is to modify the Compiler and Linker Flags and set the Path to wx-config like that (Windows 10, MSYS2 Paths):

Code: Select all

$(shell /c/Dev/Sources/wxWidgetsx64Release/wx-config --cxxflags --unicode=yes --debug=no)