Static Libraries under Gideon+QMake

ErDroh ErDroh at gmx.de
Sun Mar 9 10:55:05 UTC 2003


I use the newest Gideon from CVS and wanted to create a static library. 
I noticed, that i only can create a dynamic library or am i wrong? 
Please help me, i use qmake and cant find a option in Gideon.

Ok, when i go in my src subdirectory and run there "make staticlib" the 
staticlib will be created. But how can i change the settings, so it does 
this automatic and not the dynamic libs?

Another problem: When i want to use my own static libs, then i need to 
add linker flags. The problem is, that the flags will be added after the 
object file (in the makefile under linker), so, that it will not be 
recognized correct. Have somebody maybe a comment, how to fix this?


An example:

g++ -lmylib -L../../mylib/bin -o ../bin/myapp myapp.o    
-Wl,-rpath,/usr/qt/3/lib -L/usr/qt/3/lib -L/usr/X11R6/lib -lqt -lXext 
-lX11 -lm

But this must be:

g++ -L../../mylib/bin -o ../bin/myapp myapp.o  -lmylib  
-Wl,-rpath,/usr/qt/3/lib -L/usr/qt/3/lib -L/usr/X11R6/lib -lqt -lXext 
-lX11 -lm





More information about the KDevelop-devel mailing list