shared libraries - How correctly to link program against library -


i run ./myprogram , gives me warning:

warning: program compiled simgrid version 3.13.90, , linked against simgrid 3.13.0. proceeding anyway. 

tryldd myprogram , gives following:

libsimgrid.so.3.13.90 => /usr/lib/libsimgrid.so.3.13.90 (0x00007f338ef47000)   

then go usr/lib , type ll *sim* in terminal:

lrwxrwxrwx 1 ken ken       21 июл 28 19:29 libsimgrid.so -> libsimgrid.so.3.13.90* -rwxrwxr-x 1 ken ken 12307480 июл 28 19:29 libsimgrid.so.3.13.90* 

in cmakelists.txt link library simgrid in such way:

target_link_libraries(csim2sim simgrid) 

why myprogram still links against simgrid 3.13.0 (it doesn't exist in /usr/lib while simgrid 3.13.90 does)?

update:

command locate libsimgrid.so in ternimal gives:

/home/ken/downloads/simgrid-master/lib/libsimgrid.so /home/ken/downloads/simgrid-master/lib/libsimgrid.so.3.13.90 /home/ken/simgrid/lib/libsimgrid.so /home/ken/simgrid/lib/libsimgrid.so.3.13.90 /usr/lib/libsimgrid.so /usr/lib/libsimgrid.so.3.13.90 

the message seems buggy, looks application compiled 3.13.0, , linked libsimgrid 3.13.90. order inverted in message, fix that.

it problem includes when compile code, think. please check don't use old versions of msg.h/simgrid_config.h files when compile app (maybe there still 1 in /usr/include ?).

to check, can simgrid_version_patch in simgrid_config.h. should 90 in recent one, not 0.


Comments