There is no rule to create a target / usr / lib / someLib.so

Using the assembly to work in buntu 11.04, now in 12.04 this is not so.

There is a conflict with the location of someLib.so . That is, he is looking in the wrong place. /usr/lib/here/someLib.so is the correct location.

When I run the cm configuration in cmcm, he noticed a conflict, once. Now ccmake no longer complains, but the error still exists. runtime library [someLib.so] in /usr/lib may be hidden by files in: /usr/lib/here

The lines in the CMakeLists.txt file that cause a build error are as follows:

 ADD_EXECUTABLE(test main.cpp) TARGET_LINK_LIBRARIES(test moreStuff evenMoreStuff) 

I see a problem in the build.make file. What is generated by ccmake. I can't figure out where ccmake gets the idea that someLib.so is located at /usr/lib/ and not @ /usr/lib/here/ . I suppose this will be the SET() statement. I do not find it.

1) What is called a configuration file (ccmake 'c' cmd)? Where will it be (the same deer?)? I believe that if I do, I can again see the error. (Changing CMakeFile.txt doesn't look like this.)
2) How to find out where the location of someLib.so ? (What am I looking for?)

I hate CCMAKE. Thanks

+8
cmake
source share
1 answer

I would say that this is a problem with one of the find_library calls. If I remember correctly, this happened when your environment pointed to two different locations that contained a library file with the same name.

You can prevent this from changing the environment so that it does not point to both locations or use one of the NO _ * _ PATH with the find_library call to prevent cmake from coinciding with the two locations (for example, you could define your own path for this find_library and use NO_DEFAULT_PATH to prevent cmake from being used in environment paths - see documentation: http://www.cmake.org/cmake/help/v2.8.10/cmake.html # command: find_library )

find_library (someLib_location NAMES someLib PATHS / usr / lib / here / NO_DEFAULT_PATH)

Relatively 1) I think they are called CMakeCache files, but the safest way is to simply delete the entire assembly structure (not a problem if you build from the source)

Regarding 2), I would look for CMakeList.txt files through the library name (without the .so suffix and lib prefix, since they are probably added by the variables CMAKE_FIND_LIBRARY_PREFIXES and CMAKE_FIND_LIBRARY_SUFFIXES)

+1
source share

All Articles