I know, CodeLite is a ide. But Code::Blocks is a ide, too. I have to install MinGW and wxWidgets as well as configure it for Code::Blocks, too. But i only have to add the -static switch, not the --static switch. But that should not be a problem. To use CodeLite i will just add the --static switch too and it will work.eranif wrote:codelite is not a complier nor linker, it does not search for them, it simply activate the compiler to do this.DarkBug wrote:Another question: Where does CodeLite search for static libraries if i don't insert a library path into Project Settings->Common Settings->Linker->Library Path, but insert libraries into Project Settings->Common Settings->Linker->Libraries?
Sorry, i don't posted the new Output:eranif wrote: Even without knowing the configuration you can see in the build line where does ld is looking for the libraries (and from your link lines, I dont see any -static flag that is being passed to ld)
Code: Select all
----------Build Started--------
C:\Windows\system32\cmd.exe /c ""mingw32-make.exe" -j 4 -f "Test_wsp.mk""
----------Building project:[ Test - Release ]----------
mingw32-make.exe[1]: Entering directory `C:/Users/DarkBug/Desktop/Test'
g++ -c "C:/Users/DarkBug/Desktop/Test/main.cpp" -O2 -Wall -mthreads -DHAVE_W32API_H -D__WXMSW__ -DNDEBUG -D_UNICODE -IC:\wxWidgets2.8\lib\gcc_lib\mswu -IC:\wxWidgets2.8\include -Wno-ctor-dtor-privacy -pipe -fmessage-length=0 -Wno-attributes -o ./Release/main.o -I.
g++ -o ./Release/Test @"C:\Users\DarkBug\Desktop\Test\Test.txt" -L. -static -mwindows -s -mthreads -LC:\wxWidgets2.8\lib\gcc_lib -lwxmsw28u -lwxtiff -lwxjpeg -lwxpng -lwxzlib -lwxregexu -lwxexpat -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwxregexu -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lodbc32
mingw32-make.exe[1]: Leaving directory `C:/Users/DarkBug/Desktop/Test'
----------Build Ended----------
0 errors, 0 warnings
Thanks, but i have that already:eranif wrote:Now that Jarod42 mentioned it, you need to add it to "project settings -> linker -> options"DarkBug wrote:but why do i in Code::Blocks just have to add the -static switch to Settings->Compiler and debugger...->Linker settings->Other linker options and it works?
so it will look something similar to:note that the -static is placed outside of the $(shell ..) expressionCode: Select all
-s;$(shell wx-config --debug=no --unicode=yes --libs );-static
Eran
Compiler:
Code: Select all
-O2;-Wall;$(shell wx-config --static --cxxflags --unicode=yes --debug=no)
Code: Select all
-static -mwindows;-s;$(shell wx-config --static --debug=no --libs --unicode=yes)