issues creating xcode template on 07

[I decided to repost this as a new topic because the previous thread title was misleading…]

I’ve now got xcode creating OF templates, which I assume should be able to just compile themselves without adding any code. But mine is throwing many (mostly linking) errors and is defaulting to 10.4 SDK for some reason.

I also notice a difference between the template file group tree and an example project group tree – the examples create the frameworks file structure which contains all the libraries and the template creates a libs folder which contains the core libraries (some of which it cannot find) and core frameworks. I am attaching an image to show the difference.

I can probably fix the errors by hand, but of course I dont want to do that every time I create a new project template. Any ideas?

errors thrown:

  
  
CompileC intermediate_builds/AlphaVideoMask.build/Debug/AlphaVideoMask.build/Objects-normal/i386/main.o src/main.cpp normal i386 c++ com.apple.compilers.gcc.4_2  
cd /Users/erikparr/Documents/_openframeworks/openframeworks-openFrameworks-fb93f4c/apps/Projects/AlphaVideoMask  
setenv LANG en_US.US-ASCII  
/Developer/usr/bin/gcc-4.2 -x c++ -arch i386 -fmessage-length=0 -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -mfix-and-continue -ftree-vectorize -msse3 -mssse3 -Wno-deprecated-declarations -Wno-invalid-offsetof -gdwarf-2 -I/Users/erikparr/Documents/_openframeworks/openframeworks-openFrameworks-fb93f4c/apps/Projects/AlphaVideoMask/intermediate_builds/AlphaVideoMask.build/Debug/AlphaVideoMask.build/AlphaVideoMask.hmap -F/Users/erikparr/Documents/_openframeworks/openframeworks-openFrameworks-fb93f4c/apps/Projects/AlphaVideoMask/bin -F/Users/erikparr/Documents/_openframeworks/openframeworks-openFrameworks-fb93f4c/apps/Projects/AlphaVideoMask/../../../libs/glut/lib/osx -I/Users/erikparr/Documents/_openframeworks/openframeworks-openFrameworks-fb93f4c/apps/Projects/AlphaVideoMask/bin/include -I../../../libs/openFrameworks -I../../../libs/openFrameworks/3d -I../../../libs/openFrameworks/app -I../../../libs/openFrameworks/communication -I../../../libs/openFrameworks/events -I../../../libs/openFrameworks/gl -I../../../libs/openFrameworks/graphics -I../../../libs/openFrameworks/math -I../../../libs/openFrameworks/sound -I../../../libs/openFrameworks/types -I../../../libs/openFrameworks/utils -I../../../libs/openFrameworks/video -I../../../libs/freetype/include -I../../../libs/freetype/include/freetype2 -I../../../libs/poco/include -I/Users/erikparr/Documents/_openframeworks/openframeworks-openFrameworks-fb93f4c/apps/Projects/AlphaVideoMask/intermediate_builds/AlphaVideoMask.build/Debug/AlphaVideoMask.build/DerivedSources/i386 -I/Users/erikparr/Documents/_openframeworks/openframeworks-openFrameworks-fb93f4c/apps/Projects/AlphaVideoMask/intermediate_builds/AlphaVideoMask.build/Debug/AlphaVideoMask.build/DerivedSources -D__MACOSX_CORE__ -lpthread -include /var/folders/XW/XWUYkvSBGl8FhRbMibnqy++++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/Carbon-djwjeepuilqcwhaxpviihbnhahkr/Carbon.h -c /Users/erikparr/Documents/_openframeworks/openframeworks-openFrameworks-fb93f4c/apps/Projects/AlphaVideoMask/src/main.cpp -o /Users/erikparr/Documents/_openframeworks/openframeworks-openFrameworks-fb93f4c/apps/Projects/AlphaVideoMask/intermediate_builds/AlphaVideoMask.build/Debug/AlphaVideoMask.build/Objects-normal/i386/main.o  
  
In file included from ../../../libs/openFrameworks/ofMain.h:5,  
                 from /Users/erikparr/Documents/_openframeworks/openframeworks-openFrameworks-fb93f4c/apps/Projects/AlphaVideoMask/src/main.cpp:1:  
../../../libs/openFrameworks/utils/ofConstants.h:101:22: error: GL/glew.h: No such file or directory  
../../../libs/openFrameworks/utils/ofConstants.h:155:24: error: tesselator.h: No such file or directory  
In file included from ../../../libs/openFrameworks/ofMain.h:47,  
                 from /Users/erikparr/Documents/_openframeworks/openframeworks-openFrameworks-fb93f4c/apps/Projects/AlphaVideoMask/src/main.cpp:1:  
../../../libs/openFrameworks/graphics/ofCairoRenderer.h:4:28: error: cairo-features.h: No such file or directory  
../../../libs/openFrameworks/graphics/ofCairoRenderer.h:5:23: error: cairo-pdf.h: No such file or directory  
../../../libs/openFrameworks/graphics/ofCairoRenderer.h:6:23: error: cairo-svg.h: No such file or directory  
../../../libs/openFrameworks/graphics/ofCairoRenderer.h:7:19: error: cairo.h: No such file or directory  
In file included from ../../../libs/openFrameworks/graphics/ofPath.h:9,  
                 from ../../../libs/openFrameworks/graphics/ofCairoRenderer.h:12,  
                 from ../../../libs/openFrameworks/ofMain.h:47,  
                 from /Users/erikparr/Documents/_openframeworks/openframeworks-openFrameworks-fb93f4c/apps/Projects/AlphaVideoMask/src/main.cpp:1:  
../../../libs/openFrameworks/graphics/ofTessellator.h:7:24: error: tesselator.h: No such file or directory  
In file included from ../../../libs/openFrameworks/ofMain.h:5,  
                 from /Users/erikparr/Documents/_openframeworks/openframeworks-openFrameworks-fb93f4c/apps/Projects/AlphaVideoMask/src/main.cpp:1:  
../../../libs/openFrameworks/utils/ofConstants.h:156: error: 'TESSindex' does not name a type  
In file included from ../../../libs/openFrameworks/types/ofBaseTypes.h:17,  
                 from ../../../libs/openFrameworks/ofMain.h:15,  
                 from /Users/erikparr/Documents/_openframeworks/openframeworks-openFrameworks-fb93f4c/apps/Projects/AlphaVideoMask/src/main.cpp:1:  
../../../libs/openFrameworks/3d/ofMesh.h:60: error: 'ofIndexType' does not name a type  
../../../libs/openFrameworks/3d/ofMesh.h:61: error: 'ofIndexType' has not been declared  
../../../libs/openFrameworks/3d/ofMesh.h:62: error: 'ofIndexType' was not declared in this scope  
../../../libs/openFrameworks/3d/ofMesh.h:62: error: template argument 1 is invalid  
../../../libs/openFrameworks/3d/ofMesh.h:62: error: template argument 2 is invalid  
../../../libs/openFrameworks/3d/ofMesh.h:63: error: expected ',' or '...' before '*' token  
../../../libs/openFrameworks/3d/ofMesh.h:63: error: ISO C++ forbids declaration of 'ofIndexType' with no type  
../../../libs/openFrameworks/3d/ofMesh.h:65: error: 'ofIndexType' has not been declared  
../../../libs/openFrameworks/3d/ofMesh.h:68: error: 'ofIndexType' has not been declared  
../../../libs/openFrameworks/3d/ofMesh.h:68: error: 'ofIndexType' has not been declared  
../../../libs/openFrameworks/3d/ofMesh.h:68: error: 'ofIndexType' has not been declared  
../../../libs/openFrameworks/3d/ofMesh.h:80: error: ISO C++ forbids declaration of 'ofIndexType' with no type  
../../../libs/openFrameworks/3d/ofMesh.h:80: error: expected ';' before '*' token  
../../../libs/openFrameworks/3d/ofMesh.h:86: error: ISO C++ forbids declaration of 'ofIndexType' with no type  
../../../libs/openFrameworks/3d/ofMesh.h:86: error: expected ';' before '*' token  
../../../libs/openFrameworks/3d/ofMesh.h:92: error: 'ofIndexType' was not declared in this scope  
../../../libs/openFrameworks/3d/ofMesh.h:92: error: template argument 1 is invalid  
../../../libs/openFrameworks/3d/ofMesh.h:92: error: template argument 2 is invalid  
../../../libs/openFrameworks/3d/ofMesh.h:126: error: 'ofIndexType' was not declared in this scope  
../../../libs/openFrameworks/3d/ofMesh.h:126: error: template argument 1 is invalid  
../../../libs/openFrameworks/3d/ofMesh.h:126: error: template argument 2 is invalid  
In file included from ../../../libs/openFrameworks/ofMain.h:42,  
                 from /Users/erikparr/Documents/_openframeworks/openframeworks-openFrameworks-fb93f4c/apps/Projects/AlphaVideoMask/src/main.cpp:1:  
../../../libs/openFrameworks/gl/ofVbo.h:27: error: expected ',' or '...' before '*' token  
../../../libs/openFrameworks/gl/ofVbo.h:27: error: ISO C++ forbids declaration of 'ofIndexType' with no type  
../../../libs/openFrameworks/gl/ofVbo.h:41: error: expected ',' or '...' before '*' token  
../../../libs/openFrameworks/gl/ofVbo.h:41: error: ISO C++ forbids declaration of 'ofIndexType' with no type  
In file included from ../../../libs/openFrameworks/graphics/ofPath.h:9,  
                 from ../../../libs/openFrameworks/graphics/ofCairoRenderer.h:12,  
                 from ../../../libs/openFrameworks/ofMain.h:47,  
                 from /Users/erikparr/Documents/_openframeworks/openframeworks-openFrameworks-fb93f4c/apps/Projects/AlphaVideoMask/src/main.cpp:1:  
../../../libs/openFrameworks/graphics/ofTessellator.h:31: error: ISO C++ forbids declaration of 'TESStesselator' with no type  
../../../libs/openFrameworks/graphics/ofTessellator.h:31: error: expected ';' before '*' token  
../../../libs/openFrameworks/graphics/ofTessellator.h:32: error: 'TESSalloc' does not name a type  
In file included from ../../../libs/openFrameworks/ofMain.h:47,  
                 from /Users/erikparr/Documents/_openframeworks/openframeworks-openFrameworks-fb93f4c/apps/Projects/AlphaVideoMask/src/main.cpp:1:  
../../../libs/openFrameworks/graphics/ofCairoRenderer.h:119: error: ISO C++ forbids declaration of 'cairo_t' with no type  
../../../libs/openFrameworks/graphics/ofCairoRenderer.h:119: error: expected ';' before '*' token  
../../../libs/openFrameworks/graphics/ofCairoRenderer.h:120: error: ISO C++ forbids declaration of 'cairo_surface_t' with no type  
../../../libs/openFrameworks/graphics/ofCairoRenderer.h:120: error: expected ';' before '*' token  
../../../libs/openFrameworks/graphics/ofCairoRenderer.h:124: error: ISO C++ forbids declaration of 'cairo_matrix_t' with no type  
../../../libs/openFrameworks/graphics/ofCairoRenderer.h:124: error: expected ';' before '*' token  
../../../libs/openFrameworks/graphics/ofCairoRenderer.h:129: error: ISO C++ forbids declaration of 'cairo_t' with no type  
../../../libs/openFrameworks/graphics/ofCairoRenderer.h:129: error: expected ';' before '*' token  
../../../libs/openFrameworks/graphics/ofCairoRenderer.h:130: error: ISO C++ forbids declaration of 'cairo_surface_t' with no type  
../../../libs/openFrameworks/graphics/ofCairoRenderer.h:130: error: expected ';' before '*' token  
../../../libs/openFrameworks/graphics/ofCairoRenderer.h:134: error: 'cairo_matrix_t' was not declared in this scope  
../../../libs/openFrameworks/graphics/ofCairoRenderer.h:134: error: template argument 1 is invalid  
../../../libs/openFrameworks/graphics/ofCairoRenderer.h:134: error: template argument 2 is invalid  
../../../libs/openFrameworks/graphics/ofCairoRenderer.h:135: error: 'cairo_matrix_t' does not name a type  
  
  
  
  

Update: I *almost* fixed the problem with the template by modifying the template ‘Mac OSX Empty Example’.xcodeproj to match exactly the settings and structure as the example files. This meant replacing the ‘libs’ folder in the template with the ‘frameworks’ folder from the examples. I also added all of the User-Defined settings that are found in the example build settings.

So now it builds, but I now get a persistent error when I run everything. I’ve spent too much time trying to figure this out, so if anyone has any ideas I’d really appreciate it.

error:

  
dyld: lazy symbol binding failed: Symbol not found: _glutDragEventFunc  
  Referenced from: /Users/erikparr/OF/openframeworks-openFrameworks-b7b9c12/apps/examples/aTezt/bin/aTezt.app/Contents/MacOS/aTezt  
  Expected in: /System/Library/Frameworks/GLUT.framework/Versions/A/GLUT  
  
dyld: Symbol not found: _glutDragEventFunc  
  Referenced from: /Users/erikparr/OF/openframeworks-openFrameworks-b7b9c12/apps/examples/aTezt/bin/aTezt.app/Contents/MacOS/aTezt  
  Expected in: /System/Library/Frameworks/GLUT.framework/Versions/A/GLUT  
  

system specs:
SDK: 10.6
GCC: 4.0
xcode 3.2.6
snow leopard 10.6

Hi - I have a similar error. What do you do to get round this?

Thanks

I know it is an old post, but as there was no answer, I wanted to answer for reference and because I had this error too.

I delete all the folders in OFroot/libs, then I copied freshly from the release.
The problem is, probably, because of XCode updating the content of libs/openFrameworksCompiled/ …