[CMake] Help regarding dependency..I guess..

Eric Noulard eric.noulard at gmail.com
Fri Sep 30 03:18:02 EDT 2011


2011/9/30 gaurav chetal <chetal.gaurav at gmail.com>:
> Hello everyone..
> I have two library files in two different directories and my project
> involves linking one library with the another..So i used
> Target_link_libraries..but i am unable to execute the executable and it is
> giving the error as
> "In function `main':
> main.C:(.text+0x1c1): undefined reference to
> `toLowerCase(std::basic_string<char, std::char_traits<char>,
> std::allocator<char> > const&)'
> collect2: ld returned 1 exit status
> ".

Which version of CMake?
Which platform / compiler?

Your output make me think you are on Linux so you
should read this wiki page:
http://www.cmake.org/Wiki/CMake_RPATH_handling

and understand how dynamic library are used on most Unix.
I assume you build shared lib, right?

-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org


More information about the CMake mailing list