2

I'm trying to build OpenCV with Cmake on Windows 7. I chose to use the Visual Studio 10 compiler.

I'm getting the following error:

CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeCXXInformation.cmake:37 (get_filename_component):

get_filename_component called with incorrect number of arguments Call Stack (most recent call first): CMakeLists.txt:2 (PROJECT)

I'm sure the path to OpenCV is correct. Can anyone please guide me as to how to fix this error?

Thanks in advance!!

4
  • 1
    Can you show what is in line 37 of your CMakeLists.txt file? It looks like you are calling the function with an insufficient number of arguments. You need the variable first, then the path, then one of PATH|ABSOLUTE|NAME|EXT|NAME_WE|REALPATH to tell it what to return. See the docs Commented May 29, 2013 at 22:58
  • Thanks for your comment, line 37 is: else(NOT CMAKE_TOOLCHAIN_FILE) Moreover, I haven't made any changes to CMakeLists.txt, I'm using the version that came with the OpenCV download, so I really not sure what can go wrong. Commented May 30, 2013 at 17:27
  • I misunderstood the error message. It looks like the error is on line 37 of CMakeCXXInformation.cmake, which seems odd. You haven't changed any CMake files? If you get this error right out of the OpenCV package, I might recommend contacting the OpenCV community. Commented May 30, 2013 at 17:32
  • Yes, I'm getting this error right out of the OpenCV package. I just posted in the OpenCV forums as well. Thanks!! Commented May 30, 2013 at 17:44

1 Answer 1

1

The problem was solved following the link: http://answers.opencv.org/question/13490/cmake-opencv249-master-branch-windows-7-x64/

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.