3

I am trying to run some code from my university, but when I do "cmake .." inside "build" I get the following error:


CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: iceutil_lib linked by target "cppgui" in directory /Users/alej/Desktop/project1 linked by target "project1" in directory /Users/alej/Desktop/project1

-- Configuring incomplete, errors occurred!


Any of my friends are getting errors, can you help me?

4
  • 1
    I'd assume CMake fails to find ZeroC ICE framework. Setting Ice_HOME CMake variable to point to directory containing the library may fix the problem. Commented Dec 22, 2017 at 23:38
  • Your answer helped me, if I set Ice_HOME cmake worked but when I typed make after that, it had problems, so I had to write another route instead, but thanks anyway! Commented Dec 23, 2017 at 11:40
  • please try cmake -Diceutil_lib=/path/to/library ../ Commented Mar 28, 2019 at 10:04
  • 1
    I think the OP should accept an answer as solution when the solution works, just my 5 cents. Commented Jan 30, 2020 at 12:39

1 Answer 1

8

CMake tries to find all the libraries necessary to create the library or executable you are trying to build from the code from your university.

The found paths to those libraries are stored in special variables in CMake. By default, those variables carry the value <Library-Name>-NOTFOUND. This NOTFOUND flag is what makes CMake prompt the error message.

In general there are two possible reasons, why CMake can not find the library for you:

  • The library is not installed on your system
  • The library is installed somewhere CMake did not search for it. In this case you can help CMake by setting the library installation path into the respective CMake variables. To do this, open the file CMakeCache.txt with a text editor and search for ICEUTIL_LIB. Replace the blabla-NOTFOUND value with the actual (absolute) path of the library. There might be other variables with the ICEUTIL prefix. One of them might be named like ICEUTIL_HEADERS or ICEUTIL_INCLUDE_DIR. Replace the value of this one with the absolute path of where the .h files for ICEUTIL are found. If the include path is not set, CMake might run fine without errors, but later you will run into compiler errors saying include file not found.
Sign up to request clarification or add additional context in comments.

1 Comment

It seems it works. I searched for the ICEUTIL_LIB and replaced the path of the library. I didn´t found the other variables you mencioned but I guess there are not any. Thank you so much!!!!!!!

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.