[CMake] Problems CMake linking shared libraries
Jos Theunissen
jtheunissen at infologic.nl
Tue Apr 3 02:44:17 EDT 2007
Hello,
Can somebody explain me how I can link so's.
CMakeLists.txt:
PROJECT(hksq)
INCLUDE_DIRECTORIES(/usr/local/fradev/include)
LINK_DIRECTORIES(/usr/local/fradev/lib)
SET(PROJECT_SRCS hksq.cc)
ADD_EXECUTABLE(${PROJECT_NAME} ${PROJECT_SRCS})
SET(PROJECT_LIBS esqc.so esqc.so escm.so esini.so eslg.so esmx.so eset.so
esso.so esrs.so esds.so esrdb.so esst.so esmn.so escora++.1.14.so escm++.so
esrdb++.1.4.so esrs++.1.3.so libesmx++.3.0.so eslg++.so)
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${PROJECT_LIBS})
When linking the executable ld cannot find the shared libraries because the
extensions is missing (see -lesqc)
Linking CXX executable hksq
/usr/lib/gcc/i586-suse-linux/4.1.2/../../../../i586-suse-linux/bin/ld:
cannot find -lesqc
collect2: ld returned 1 exit status
make[2]: *** [hksq] Error 1
make[1]: *** [CMakeFiles/hksq.dir/all] Error 2
make: *** [all] Error 2
suse10jt#fradev@/usr/local/fradev/src/atest2>
Why is the extension removed?
Best regards,
Jos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20070403/e8058a22/attachment.html
More information about the CMake
mailing list