Library linking issue - trying to create an ofxaddon: "-lGazeApiLib is not an object file (not allowed in a library)"

Hi -

I’m trying to create an ofxAddon -
actually a fork of https://github.com/TatsuyaOGth/ofxEyeTribe, but compatible with oF 0.9.

I’m using a library from The Eye Tribe:
https://github.com/EyeTribe/tet-cpp-client

I used cmake to build the library (per github instructions) which created libGazeApiLib.a

I put this in my ofxEyeTribe addon folder under

/libs/tet-cpp-client/lib/osx/libGazeApiLib.a

I also have the headers under

/libs/tet-cpp-client/includes/*

Here’s my folder structure:

When I try to include the addon in a project and build I get this linker error:

error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can’t locate file for: -lGazeApiLib
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: -lGazeApiLib is not an object file (not allowed in a library)

Screenshot:

I’m pretty new to including libraries in XCode in general, and this is the first addon I’ve tried to create, and I’m not sure if I’m doing something wrong. Any suggestions?

Ok, now things are getting weird. I’m getting this this error on EVERY project I try to run, even the example projects (that don’t include my addon or have any linked libraries).

The error seems to come from this:

Libtool /Users/tyler/of_v0.9.0_osx_release/libs/openFrameworksCompiled/lib/osx/build/debug/openFrameworks.build/Objects-normal/x86_64/openFrameworksDebug.a normal x86_64
cd /Users/tyler/of_v0.9.0_osx_release/libs/openFrameworksCompiled/project/osx
export MACOSX_DEPLOYMENT_TARGET=10.7
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -static -arch_only x86_64 -syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -L/Users/tyler/of_v0.9.0_osx_release/libs/openFrameworksCompiled/lib/osx -filelist /Users/tyler/of_v0.9.0_osx_release/libs/openFrameworksCompiled/lib/osx/build/debug/openFrameworks.build/Objects-normal/x86_64/openFrameworksDebug.LinkFileList -lGazeApiLib -o /Users/tyler/of_v0.9.0_osx_release/libs/openFrameworksCompiled/lib/osx/build/debug/openFrameworks.build/Objects-normal/x86_64/openFrameworksDebug.a

Specifically, the -lGazeApiLib flag (flag?). How did that get in there? Better yet, how do I remove it?

I don’t understand what’s going on…

Any suggestions on how to fix this?

Well, I was able to fix it by grabbing the new version of oF (0.9.3).

And actually, my addon is working so far with that version.

I have no idea what happened to my 0.9 installation… if anybody has any idea on what went wrong, I’d love to learn.

Hey ttyy. I am having some issues running the original ofxEyeTribe in certain versions of openFrameworks. Did you by any chance put your working fork online? Or would you be willing to send it to me?

Cheers
Andreas