At 04:08 AM 8/4/2006, Anders Sundman wrote:
>Shouldn't the line:
>-> C:\MinGW\bin\g++.exe    -shared -o liba.dll -Wl,--out-implib,liba.dll.a 
>"CMakeFiles/a.dir/a.obj" -lb
>
>also contain a -L switch since I have the line 
>"LINK_DIRECTORIES(${TEST_SOURCE_DIR}/b)" in the cmake file for the "a"-lib?
>
>// Anders Sundman 

It is an ordering problem, you have this:

ADD_LIBRARY(liba SHARED liba.cpp)
INCLUDE_DIRECTORIES(${TEST_SOURCE_DIR}/libb)
LINK_DIRECTORIES(${TEST_SOURCE_DIR}/libb)
TARGET_LINK_LIBRARIES(liba libb)

The LINK_DIRECTORIES command has to come before the ADD_LIBRARY command.

-Bill

_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to