Skip to main content

Thread: CMAKE - Link against libraries


hi all,

new cmake , somehow lost...

have sub-project, makefile is:
code:
tartine_incl = /home/me/lib_tartine/include tartine_lib = -l/home/me/lib -ltata -ltoto -ltutu all: hello hello: hello.cpp     gcc -i$(tartine_incl) -o hello hello.cpp $(tartine_lib)
i try integrate bigger cmake-based project. "just" want bigger project link against tartine library.

did:
code:
set(tartine "/home/me/lib_tartine")  include_directories(${tartine}/include) link_directories(${tartine}/lib) target_link_libraries( #a bunch of preexisting stuffs                      ${tartine}/lib)
when compiling, include paths working, got "undefined reference ...", proves link did not work...

help,
m.

i'm not cmake user, seem me missing specification following libraries:
code:
-ltata -ltoto -ltutu
this may cause of "undefined references" linker reporting.


p.s. regular makefile incorrect; tartine paths differ, , should use 'g++', not 'gcc'.


Forum The Ubuntu Forum Community Ubuntu Specialised Support Development & Programming Programming Talk CMAKE - Link against libraries


Ubuntu

Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support