[CMake] Problems with linking on MinGW?
Jesse Perla
jesseperla at gmail.com
Tue Jun 15 10:54:28 EDT 2010
I am using CMake 2.8.1 on Windows 7. I have MinGW installed with GCC 4.5
I have successfully compiled a library with a MinGW and cmake. The full
path to the library is: c:\working\etk_binaries\libetk-mgw45.a
However, when I want to link this file into an executable (no need to have
the CMake dependencies, etc. in projects) it can't seem to find this file.
My cmakelists.txt is:
cmake_minimum_required(VERSION 2.6)
set(PROJECT_NAME "test" )
set(SRCS test.cpp )
project(${PROJECT_NAME})
add_executable(${PROJECT_NAME} ${SRCS})
link_directories( "c:/working/etk_binaries")
target_link_libraries(${PROJECT_NAME} libetk-mgw45)
The error I get is:
c:\MinGW\bin/ld.exe: cannot find -llibetk-mgw45
collect2: ld returned 1 exit status
mingw32-make[2]: *** [test.exe] Error 1
mingw32-make[1]: *** [CMakeFiles/test.dir/all] Error 2
Any ideas on what I have done wrong?
Thanks,
Jesse
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100615/5f2233f4/attachment.htm>
More information about the CMake
mailing list