Skip to content

ld: library not found for -lhighgui #30

@ashgillman

Description

@ashgillman

I had an error compiling on OSX Yosemite

Linking CXX executable flandmark_1
ld: library not found for -lhighgui
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [examples/flandmark_1] Error 1
make[2]: Target `examples/CMakeFiles/flandmark_1.dir/build' not remade because of errors.
make[1]: *** [examples/CMakeFiles/flandmark_1.dir/all] Error 2

I was able to fix by modifying /examples/CMakeLists.txt and commenting out lines 10 and 11.

if (UNIX)
#set(CV_LIBS_1 highgui)
#set(CV_LIBS_2 cxcore cv cvaux)
elseif (WIN32)
set(CV_LIBS_1 highgui${OpenCV_VERSION_MAJOR}${OpenCV_VERSION_MINOR}${OpenCV_VERSION_PATCH})
set(CV_LIBS_2 cxcore${OpenCV_VERSION_MAJOR}${OpenCV_VERSION_MINOR}${OpenCV_VERSION_PATCH} cv${OpenCV_VERSION_MAJOR}${OpenCV_VERSION_MINOR}${OpenCV_VERSION_PATCH} cvaux${OpenCV_VERSION_MAJOR}${OpenCV_VERSION_MINOR}${OpenCV_VERSION_PATCH})
elseif (APPLE)
endif (UNIX)

Although, this would probably break the installation on other systems. I believe there may be some issue preventing the installer from setting the UNIX variable false.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions