Since I did not get any response, I'll try to shorten the problem
description: I try to build a static convenience lib holding all my
.o-files and then to link statically against it and all other libs.
In my CMakeLists.txt, I have
SET(CMAKE_EXE_LINKER_FLAGS -static)
ADD_LIBRARY(baselib STATIC
Joachim Ziegler wrote:
I suppose the problem is in the link line, which says:
/usr/bin/X11/c++ -fPIC -static
CMakeFiles/startCompletionServer.dir/StartCompletionServer.o -o
startCompletionServer -rdynamic -L/KM/home-0/ziegler/tmp/build
-Wl,-Bstatic -lbaselib -Wl,-Bdynamic -lpthread
Joachim Ziegler wrote:
Joachim Ziegler wrote:
I suppose the problem is in the link line, which says:
/usr/bin/X11/c++ -fPIC -static
CMakeFiles/startCompletionServer.dir/StartCompletionServer.o -o
startCompletionServer -rdynamic -L/KM/home-0/ziegler/tmp/build
-Wl,-Bstatic -lbaselib
Brad King wrote:
It looks like you're using CMake 2.4. In CMake 2.6 your example builds
correctly for me.
Yes, you're right. Thank you very much.
I've used version 2.4.8 as installed on Debian 4.0.
Upgrading to 2.6 solves the problem.
Thanks and kind regards,
Joachim Ziegler
Hello list,
I've tried to put all my .o-files into some kind of convenience lib so
that not every object file is rebuilt for every target that I have. A
problem arises when I try to create a static lib and a static
binary that is linked against this lib.
I have in my CMakeLists.txt (here only