Skip to content
Advertisement

Tag: cmake

cmake linking shared libraries on ubuntu

Hi I am having problems with linking two libraries on ubuntu using cmake 2.8.12 Directory structure CMakeLists.txt for lib1 This builds fine. Then for lib2 I have the following CMakeLists.txt Here I get Linking CXX shared library ../build/liblib2.so /usr/bin/ld: cannot find -llib1 I am not clear how to correctly link these two shared libraries using CMake. Anyone an idea what

Shared library on Linux and -fPIC error

I am trying to compile a shared library in Linux using a Makefile created with Cmake, but running make I obtain the following error: I provide the following command in the CMakeLists.txt in order to say that I want a shared (.so) library: add_library(cpp-lib SHARED ${CPP_FILES}) What else do I need to specify in order to avoid the -fPIC error

How to tell CMake where to put build files?

I want to tell CMake to output files and folders to a different folder instead of the current folder. I’m talking about the generated files by CMake below: file: CMakeCache.txt dir: CMakeFiles/ file: Makefile dir: bin/ file: cmake_install.cmake Is there a way to let CMake output these files and folders in another folder? I wrote a tool that executes CMake

CMake complains “The CXX compiler identification is unknown”

I am following this thread and this one to build my own KDE without a sudo permission. Since there was no Git and CMake installed on the workstation. I just had them both installed under /home/< user> and added /home/< user>/bin and /home/< user>/lib to both PATH and LD_LIBRARY_PATH. Since KDE build only supports CMake, not configure. So I have

Advertisement