On 25.10.11 13:15:37, Jose wrote: > Hi all, > > I'm cross compiling an app under Fedora. I get this linking errors while > building with cmake : > > /usr/lib/gcc/i686-pc-mingw32/4.5.3/../../../../i686-pc-mingw32/bin/ld: > cannot find -lxerces-c > /usr/lib/gcc/i686-pc-mingw32/4.5.3/../../../../i686-pc-mingw32/bin/ld: > cannot find -lportablexdr > /usr/lib/gcc/i686-pc-mingw32/4.5.3/../../../../i686-pc-mingw32/bin/ld: > cannot find -lz > /usr/lib/gcc/i686-pc-mingw32/4.5.3/../../../../i686-pc-mingw32/bin/ld: > cannot find -lsqlite3 > > > The thing is that the libraries have been found,included and linked with > target_link_libraries. I'm adding all the necessary flags to link statically > and the libraries are the ones included in the mingw package. It shoud work > because a different part of the application that uses almost the same > libraries is cross compiling perfectly. The cmake files are actually pretty > much the same so I don't really know what I'm doing wrong. Cmake might be > missing the libraries or the path of the libraries....
Hmm, -lfoo means the linker will search for a shared library. Linking static libraries is done by specifying the absolute path to the library file. How exactly are you calling target_link_libraries and assuming that you're passing above libraries via cmake-variables whats the content of those variables? Andreas -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
