On Mon, 2017-04-03 at 08:53 +0900, Heungsub Lee wrote: > Thank you Loca for the answer. > > Your assumptions are all true but I'm not familiar with gcc or pkg- > config. > > I tried to use pkg_config instead as you said. But it doesn't > produce > `-Wl,-rpath` option so I couldn't use the draft API: > > $ echo $(PKG_CONFIG_PATH=local/lib/pkgconfig pkg-config --cflags -- > libs > libzmq) > -DZMQ_BUILD_DRAFT_API=1 -I/home/sub/local/include > -L/home/sub/local/lib > -lzmq > > $ gcc tmp.c $(PKG_CONFIG_PATH=local/lib/pkgconfig pkg-config --cflags > --libs libzmq) && ./a.out > NO DRAFT > ./a.out: symbol lookup error: ./a.out: undefined symbol: zmq_join > > > What am I wrong? > > Regards, > Heungsub
Check what the binary is linked against: ldd a.out You might have a build of the library with the same soname in your canonical LD_LIBRARY_PATH so it gets picked instead. Try: LD_LIBRARY_PATH=/home/sub/local/lib ./a.out Kind regards, Luca Boccassi
signature.asc
Description: This is a digitally signed message part
_______________________________________________ zeromq-dev mailing list [email protected] https://lists.zeromq.org/mailman/listinfo/zeromq-dev
