Page 1 of 1
CodeLite on Kubuntu 20.04 VM
Posted: Fri Jun 18, 2021 5:17 pm
by Netzschleicher
Hello together,
i set up a new VM with KUbuntu 20.04 LTS.
wxWidgets are kompiled with following Script:
Code: Select all
#!/bin/bash
cd /usr/share/wxWidgets-3.1.5/
mkdir gtk-build
cd gtk-build
../configure --enable-debug --disable-shared --enable-mediactrl --with-opengl
make install
ldconfig
make clean
../configure --disable-debug --disable-shared --enable-mediactrl --with-opengl
make install
ldconfig
make clean
../configure --enable-debug --enable-shared --enable-mediactrl --with-opengl
make install
ldconfig
make clean
../configure --disable-debug --enable-shared --enable-mediactrl --with-opengl
make install
ldconfig
make clean
cd ..
rm -rf gtk-build
cd /home/uwe
Now, when i compile an Application i Points to /usr/lib/x86_64-linux-gnu/wx but it should point to /usr/local/lib/wx !
Is there an Environment-Variable like 'WXCFG' to use?
Thanks very much
Netzschleicher
Re: CodeLite on Kubuntu 20.04 VM
Posted: Fri Jun 18, 2021 6:05 pm
by eranif
On Linux, wxWidgets uses the wx-config
script.
If you get the wrong paths, it means that the wrong wx-config
tool was used.
If I had to guess, I would say that you have 2 wx-config
(at least) installed
/usr/bin/wx-config
/usr/local/bin/wx-config
Local builds will install under /usr/local/
What is the output of /usr/local/bin/wx-config --libs
? does it produce the output you want?
If it does, than its just a matter of setting up your PATH
environment variable in your ~/.bashrc
(assuming you are using bash) to include:
If you are build from within CodeLite, than you have 2 options:
- In the project settings, modify the
$(shell wx-config --libs)
and $(shell wx-config --cflags)
(from the project settings -> compiler
and project settings -> linker
) to use full path (i.e. use /usr/local/bin/wx-config
)
- Go to
settings -> environment variables
and add this line: PATH=/usr/local/bin:$PATH
HTH
Eran
Re: CodeLite on Kubuntu 20.04 VM
Posted: Fri Jun 18, 2021 6:38 pm
by Netzschleicher
shows me the right libs.
But setting PATH=/usr/local/bin:$PATH in Bash and/or in CodeLite Environment changes nothing.
CodeLite says
/bin/make -e -f Makefile
----------Building project:[ SystemInfo - GTK-Debug ]----------
make[1]: Entering directory '/home/uwe/Dokumente/SystemInfo/SystemInfo'
Code: Select all
Warning: No config found to match: /bin/wx-config --libs --unicode=yes --static=yes
in /usr/lib/x86_64-linux-gnu/wx/config
If you require this configuration, please install the desired
library build. If this is part of an automated configuration
test and no other errors occur, you may safely ignore it.
You may use wx-config --list to see all configs available in
the default prefix.
Warning: No config found to match: /bin/wx-config --cxxflags --unicode=yes --static=yes
in /usr/lib/x86_64-linux-gnu/wx/config
If you require this configuration, please install the desired
library build. If this is part of an automated configuration
test and no other errors occur, you may safely ignore it.
You may use wx-config --list to see all configs available in
the default prefix.
Warning: No config found to match: /bin/wx-config --cxxflags --unicode=yes --static=yes
in /usr/lib/x86_64-linux-gnu/wx/config
If you require this configuration, please install the desired
library build. If this is part of an automated configuration
test and no other errors occur, you may safely ignore it.
You may use wx-config --list to see all configs available in
the default prefix.
/bin/x86_64-linux-gnu-g++ -c "/home/uwe/Dokumente/SystemInfo/SystemInfo/main.cpp" -g -O0 -Wall -o ../build-GTK-Debug/SystemInfo/main.cpp.o -I.
/home/uwe/Dokumente/SystemInfo/SystemInfo/main.cpp:22:10: fatal error: wx/wx.h: No such file or directory
22 | #include <wx/wx.h>
| ~~~~~
compilation terminated.
make[1]: *** [SystemInfo.mk:96: ../build-GTK-Debug/SystemInfo/main.cpp.o] Error 1
make[1]: Leaving directory '/home/uwe/Dokumente/SystemInfo/SystemInfo'
make: *** [Makefile:5: All] Error 2
====1 errors, 0 warnings====
Re: CodeLite on Kubuntu 20.04 VM
Posted: Fri Jun 18, 2021 8:09 pm
by Netzschleicher
some hint: 'wx-config --libs' on bash uwe@vm-linux-prog:~$ gives:
Code: Select all
-L/usr/local/lib -pthread -lwx_gtk3u_xrc-3.1 -lwx_gtk3u_html-3.1 -lwx_gtk3u_qa-3.1 -lwx_gtk3u_core-3.1 -lwx_baseu_xml-3.1 -lwx_baseu_net-3.1 -lwx_baseu-3.1
but in CodeLite it refers to /usr/bin
Re: CodeLite on Kubuntu 20.04 VM
Posted: Fri Jun 18, 2021 8:25 pm
by Netzschleicher
When i compile with CMake as Build System, all good. It compiles without errors.
But with CodeLite Makefile Generator it cannot find my compiled wxWidgets.
Re: CodeLite on Kubuntu 20.04 VM
Posted: Fri Jun 18, 2021 9:22 pm
by DavidGH
Hi,
Warning: No config found to match: /bin/wx-config --libs --unicode=yes --static=yes
in /usr/lib/x86_64-linux-gnu/wx/config
You have a normal, dynamic-linking wx build, not a static-linking one (which is rarely used/needed on Linux). However, somewhere in your workspace configuration (probably the Linker section) you have added --disable-shared or similar. Remove that, do a clean build and it should work.
Regards,
David
Re: CodeLite on Kubuntu 20.04 VM
Posted: Fri Jun 18, 2021 10:07 pm
by Netzschleicher
You are right. I have a static an a dynamic build to switch between them. When compiling with CMake all work find and i can compile a dynamic and also a static Application.
With Codelite makefile Generator no of them compiles.
Also the Codelite makefile Generator uses /bin/wx-config which refers to System preinstalled wx3.0.
CMake refers to /usr/local/bin/wx-config which is my compiled wx3.1.
Re: CodeLite on Kubuntu 20.04 VM
Posted: Fri Jun 18, 2021 11:12 pm
by DavidGH
Also the Codelite makefile Generator uses /bin/wx-config which refers to System preinstalled wx3.0.
Then you need to tell it not to. The easiest way is to use the full path in the Compiler and Linker settings:
Code: Select all
-g;-O0;-Wall;$(shell /usr/local/bin/wx-config --cflags)
and
$(shell /usr/local/bin/wx-config --libs)
Re: CodeLite on Kubuntu 20.04 VM
Posted: Mon Jun 21, 2021 7:58 pm
by Netzschleicher
Thank s a lot for the Tipps.
I setup my Projects with CMake and all works fine on Linux and Windows.