flandmark icon indicating copy to clipboard operation
flandmark copied to clipboard

Linking error for Examples on Mac OS X

Open laranea opened this issue 11 years ago • 6 comments

Hi, First of all thanks for this great library. The compilation of the static and dynamic libraries go well but when I try to compile the examples I receive this error:

kristofleroux@Edwi ~/Projects/flandmark/examples (master) > make Linking CXX executable Project_1 Undefined symbols for architecture x86_64: "cvResize", referenced from: flandmark_get_normalized_image_frame(IplImage, int const, double_, unsigned char_, model_struct_) in libflandmark_static.a(flandmark_detector.o) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *_* [Project_1] Error 1 make[1]: *** [CMakeFiles/Project_1.dir/all] Error 2 make: *** [all] Error 2

Any idea what is causing the problem ? Thanks in advance!

laranea avatar Apr 13 '13 19:04 laranea

I solved it using: g++ pkg-config opencv --cflags --libs -l flandmark_static example2.cpp -o example2 Something must be wrong with the cmake files...

laranea avatar Apr 13 '13 19:04 laranea

Hi, you are right, the cmake files are not yet finished to be used on Mac (the branches with Apple are empty). I planned to add them later, because I don't have access to any machine with Mac operating system, and then I forgot. I will try to fix this soon. Thanks for notification.

uricamic avatar Apr 13 '13 21:04 uricamic

It's my pleasure to confirm working OSX on Mountain Lion and Mavericks :+1:

sthalik avatar Dec 04 '13 02:12 sthalik

@uricamic can you update INSTALL noting OSX compatibility?

sthalik avatar May 30 '14 13:05 sthalik

Hello, I am newbie on Cmake, so how to compile and build the libraries in Mac OS X? I've already installed the CMAKE and download a fresh version of flandmark. Inside that directory downloades I can see a lot of files, but I am not sure what are the source for Cmake process. Thanks.

vhakti avatar Jan 20 '15 03:01 vhakti

@vhakti Hello, for CMake process, you need just the CMakeLists.txt file. For initiating cmake process, use either some cmake-gui or command line, specifying the source and binary directories.

For example, from the command line when in ${PROJECT_BINARY_DIR} execute:

ccmake ${PROJECT_SOURCE_DIR} .

This will open CMake command line GUI, where you can check paths to libraries, and change some settings and allow you to generate project to be compiled.

uricamic avatar Jan 21 '15 00:01 uricamic