linker error on GLee.a on OS X 10.7 with XCode 4

Trying to get my old apps running on OS X 10.7, XCode 4, and github master (ie. OF 007). I started my XCode project from scratch by copying emptyExample and modifying it, which helped with a bunch of errors. I added all the include paths I need, and switched the architecture to 32-bit. I also updated all my code to OF 007, eg. by replacing ofxThread with ofThread and ripping out some other code. Finally the app gets through compilation, but now dies on linking.

XCode doesn’t actually show the linker error (see screenshot), but when I copy the problematic command and run it in the console, I see this:

  
  
$ /Developer/usr/bin/llvm-g++-4.2 -arch i386 -isysroot /Developer/SDKs/MacOSX10.6.sdk -L/Users/ian/Projects/of/apps/mine/fLLLP/bin -F/Users/ian/Projects/of/apps/mine/fLLLP/bin -F/Users/ian/Projects/of/apps/mine/fLLLP/../../../libs/glut/lib/osx -filelist /Users/ian/Library/Developer/Xcode/DerivedData/fLLLP-baemmuaqeyhucdffhdhhkttcpblw/Build/Intermediates/fLLLP.build/Debug/fLLLP.build/Objects-normal/i386/fLLLPDebug.LinkFileList -mmacosx-version-min=10.6 -dead_strip /Users/ian/Projects/of/libs/openFrameworksCompiled/lib/osx/openFrameworksDebug.a /Users/ian/Projects/of/apps/mine/fLLLP/../../../libs/GLee/lib/osx/GLee.a /Users/ian/Projects/of/apps/mine/fLLLP/../../../libs/rtAudio/lib/osx/rtAudio.a -framework AGL -framework ApplicationServices -framework AudioToolbox -framework Carbon -framework CoreAudio -framework CoreFoundation -framework CoreServices -framework OpenGL -framework QuickTime -framework AppKit -framework Cocoa -framework IOKit -framework GLUT /Users/ian/Projects/of/apps/mine/fLLLP/../../../libs/poco/lib/osx/CppUnit.a /Users/ian/Projects/of/apps/mine/fLLLP/../../../libs/poco/lib/osx/PocoFoundation.a /Users/ian/Projects/of/apps/mine/fLLLP/../../../libs/poco/lib/osx/PocoNet.a /Users/ian/Projects/of/apps/mine/fLLLP/../../../libs/poco/lib/osx/PocoUtil.a /Users/ian/Projects/of/apps/mine/fLLLP/../../../libs/poco/lib/osx/PocoXML.a /Users/ian/Projects/of/apps/mine/fLLLP/../../../libs/freetype/lib/osx/freetype.a -lfmodex /Users/ian/Projects/of/apps/mine/fLLLP/../../../libs/FreeImage/lib/osx/freeimage.a -o /Users/ian/Projects/of/apps/mine/fLLLP/bin/fLLLPDebug.app/Contents/MacOS/fLLLPDebug  
i686-apple-darwin11-llvm-g++-4.2: /Users/ian/Projects/of/apps/mine/fLLLP/../../../libs/GLee/lib/osx/GLee.a: No such file or directory  
i686-apple-darwin11-llvm-g++-4.2: /Users/ian/Projects/of/apps/mine/fLLLP/../../../libs/poco/lib/osx/CppUnit.a: No such file or directory  
  

It looks like GLee was ripped out of OF a while ago, so I’m not sure where these linker flags are coming from. I’ve searched my whole project in XCode and can’t find any references to it. However, when I grepped through the project directory, I did find this:

  
  
$ grep -R GLee *  
Binary file build/emptyExample.build/Debug/emptyExample.build/emptyExampleDebug.hmap matches  
Binary file build/emptyExample.build/emptyExample.pbxindex/strings.pbxstrings/strings matches  
fLLLP.xcodeproj/project.pbxproj:                E45BE0AA0E8CC67C009D7055 /* GLee.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE0A90E8CC67C009D7055 /* GLee.a */; };  
fLLLP.xcodeproj/project.pbxproj:                E45BE0A70E8CC67C009D7055 /* GLee.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GLee.h; path = ../../../libs/GLee/include/GLee.h; sourceTree = SOURCE_ROOT; };  
fLLLP.xcodeproj/project.pbxproj:                E45BE0A90E8CC67C009D7055 /* GLee.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = GLee.a; path = ../../../libs/GLee/lib/osx/GLee.a; sourceTree = SOURCE_ROOT; };  
fLLLP.xcodeproj/project.pbxproj:                                E45BE0AA0E8CC67C009D7055 /* GLee.a in Frameworks */,  
fLLLP.xcodeproj/project.pbxproj:                                E45BE0A50E8CC67C009D7055 /* GLee */,  
fLLLP.xcodeproj/project.pbxproj:                E45BE0A50E8CC67C009D7055 /* GLee */ = {  
fLLLP.xcodeproj/project.pbxproj:                        name = GLee;  
fLLLP.xcodeproj/project.pbxproj:                        path = ../../../libs/GLee;  
fLLLP.xcodeproj/project.pbxproj:                                E45BE0A70E8CC67C009D7055 /* GLee.h */,  
fLLLP.xcodeproj/project.pbxproj:                        path = ../../../libs/GLee/include;  
fLLLP.xcodeproj/project.pbxproj:                                E45BE0A90E8CC67C009D7055 /* GLee.a */,  
fLLLP.xcodeproj/project.pbxproj:                        path = ../../../libs/GLee/lib/osx;  
  

Not sure how those got in there, nor how to remove them. The xcodeproj directory is completely new from emptyExample, so I don’t see how it could be from the old XCode 3 project… Any ideas?

![](http://forum.openframeworks.cc/uploads/default/1835/Screen Shot 2011-09-09 at 5.53.37 PM.png)

if you’re still seeing complaints regarding glee, that means you haven’t really swapped the project file yet. if you look at the 007 empty example or any other example, and open up the .pbxproj with a text editor you’ll see no references to glee.

try creating the project file again. i recommend starting with the ofxOpenCv example since it looks like you’re using opencv – that should save you a few steps.

also, you don’t need to switch over to ofThread or ofVectorMath if it requires changing a lot of code – you can include the old headers instead which typedef ofxThread etc.

Looks like the GLee references are in both emptyExample and opencvExample in Git head:

  
  
$ git log | head -n 1  
commit fca449d348cf33803609a837311fa07450706750  
$ grep -R GLee emptyExample.xcodeproj/  
emptyExample.xcodeproj/project.pbxproj:		E45BE0AA0E8CC67C009D7055 /* GLee.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE0A90E8CC67C009D7055 /* GLee.a */; };  
emptyExample.xcodeproj/project.pbxproj:		E45BE0A70E8CC67C009D7055 /* GLee.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GLee.h; path = ../../../libs/GLee/include/GLee.h; sourceTree = SOURCE_ROOT; };  
emptyExample.xcodeproj/project.pbxproj:		E45BE0A90E8CC67C009D7055 /* GLee.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = GLee.a; path = ../../../libs/GLee/lib/osx/GLee.a; sourceTree = SOURCE_ROOT; };  
emptyExample.xcodeproj/project.pbxproj:				E45BE0AA0E8CC67C009D7055 /* GLee.a in Frameworks */,  
emptyExample.xcodeproj/project.pbxproj:				E45BE0A50E8CC67C009D7055 /* GLee */,  
emptyExample.xcodeproj/project.pbxproj:		E45BE0A50E8CC67C009D7055 /* GLee */ = {  
emptyExample.xcodeproj/project.pbxproj:			name = GLee;  
emptyExample.xcodeproj/project.pbxproj:			path = ../../../libs/GLee;  
emptyExample.xcodeproj/project.pbxproj:				E45BE0A70E8CC67C009D7055 /* GLee.h */,  
emptyExample.xcodeproj/project.pbxproj:			path = ../../../libs/GLee/include;  
emptyExample.xcodeproj/project.pbxproj:				E45BE0A90E8CC67C009D7055 /* GLee.a */,  
emptyExample.xcodeproj/project.pbxproj:			path = ../../../libs/GLee/lib/osx;  
emptyExample.xcodeproj/project.pbxproj:				LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_4 = "\"$(SRCROOT)/../../../libs/GLee/lib/osx\"";  
emptyExample.xcodeproj/project.pbxproj:				LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_4 = "\"$(SRCROOT)/../../../libs/GLee/lib/osx\"";  
emptyExample.xcodeproj/project.pbxproj:				LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_4 = "\"$(SRCROOT)/../../../libs/GLee/lib/osx\"";  
  

Looks like it’s not in the ones from the downloaded package, so I’ll try with one of those.

there aren’t any xcode project files in the repo anymore, just before 007 released we switched to generated project files. so if you have any project files, they’re leftovers.

the readme.txt at the root has per-OS instructions for generating project files. for OSX:

build and run the _DeployExamples located at: apps/devApps/_DeployExamples/deployExamples.xcodeproj

Awesome, starting from the downloaded opencvExample really made it much easier. Wish I’d thought of that sooner :wink: Thanks for the help.

Ah, I was looking at readme.osx, not readme.txt :stuck_out_tongue:

ah, yes – the readme.txt is github specific rather than OS specific, maybe it should be renamed readme.git?