Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'ld: unknown option: -rpath=./libs' - linking error while building openframework addon on mac os 10.7.5

Tags:

c++

macos

I am quite new to coding and I am trying to build an example project of an openframework addon, called ofxReprojection. When I go:

cd /Users/Macbookpro/Documents/openframeworks/addons/ofxReprojection/example-ofxKinect 

and then

make

I get this error:

ld: unknown option: -rpath=./libs
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [bin/example-ofxKinect] Error 1
make: *** [Release] Error 2
Macbooks-MacBook-Pro:example-ofxKinect Macbookpro$ 

I have Mac OS 10.7.5.

I hope someone can help, for the sake of art :)

like image 499
Ekin Horzum Avatar asked Oct 20 '14 18:10

Ekin Horzum


2 Answers

Use a , instead of = to pass arguments. Using = is a GNU linker feature. For instance, use -Wl,-rpath,./libs to set RPATH.

From the clang man page:

If option contains commas, it is split into multiple options at the commas. You can use this syntax to pass an argument to the option.

like image 192
greg Avatar answered Oct 21 '22 01:10

greg


I got similar error while compiling other source code on my Mac. After removing '=' from '-rpath', the compilation error is resolved.

like image 44
Hank Huang Avatar answered Oct 21 '22 01:10

Hank Huang