So, I am having a problem cross-compiling with CMake where I specify a library to link against with target_link_libraries (full path) and cmake strips the path. When I want a library to be linked such as /foo/bar/libbas.dll, cmake strips it to just -lbas.

I have already read through https://www.mail-archive.com/cmake@cmake.org/msg36653.html, looked at http://www.cmake.org/cmake/help/v3.0/command/add_library.html, and added add_library and set IMPORTED_LOCATION as specified, but am still seeing g++ ran with -lbas. Has anyone seen this problem?

(I am encountering linking errors if the full path is not specified :/)

<edit>

Apparently, upon building boost, the resulting .dll.a lacks symbols that the .dll has :/ mingw32 was picking the wrong one to use, thus making cmake drop the path.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement