Environment Variables?

General questions regarding the usage of CodeLite
root
CodeLite Enthusiast
Posts: 21
Joined: Tue Jan 21, 2020 4:10 pm
Genuine User: Yes
IDE Question: C++
Contact:

Environment Variables?

Post 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?
Win X Pro / CodeLite 14.0 / wxCrafter 2.9 / wxWidgets-3.1.4 / MinGW-10.2.0

Linux Mint 20.0 / CodeLite 14.0 / wxCrafter 2.9 / wxWidgets-3.0 & 3.1.4 / GCC-9.2.0
DavidGH
CodeLite Plugin
Posts: 714
Joined: Wed Sep 03, 2008 7:26 pm
Contact:

Re: Environment Variables?

Post 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
guyr
CodeLite Curious
Posts: 7
Joined: Wed Feb 01, 2017 11:16 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Environment Variables?

Post 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.
MeerMusik
CodeLite Curious
Posts: 8
Joined: Thu Apr 29, 2021 7:14 pm
Genuine User: Yes
IDE Question: C++
Location: Germany
Contact:

Re: Environment Variables?

Post 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)
Post Reply