[CMake] problems linking with g++ on Ubuntu
Davis Ford
davisford at gmail.com
Mon Sep 24 11:28:26 EDT 2012
Hi, I have a project that I'm able to build fine on Mac OS with CMake, but
when I check same project out on Ubuntu 12.04, I'm getting undefined
reference errors at link time.
Here's the relevant section of the CMakeLists.txt file, and make VERBOSE=1
output for both Mac OS X (success) and Ubuntu 12.04 (failure)
https://gist.github.com/3776497
The specific failure is
In function `Comm_Create':
Comm.c:(.text+0x42): undefined reference to `zctx_new'
This function is defined in libczmq.a (which is being linked in the Make
output)
$ nm /usr/local/lib/libczmq.a | grep zctx_new
00000010 T zctx_new
U zctx_new
U zctx_new
U zctx_new
U zctx_new
U zctx_new
U zctx_new
U zctx_new
The other failure is
Comm.c:(.text+0x5c): undefined reference to `zsocket_new'
This function is also defined in libczmq.a
$ nm /usr/local/lib/libczmq.a | grep zsocket_new
U zsocket_new
U zsocket_new
U zsocket_new
00000000 T zsocket_new
U zsocket_new
U zsocket_new
U zsocket_new
What am I missing here?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120924/963ac431/attachment.htm>
More information about the CMake
mailing list