Xcode and glfw, the return of cryptic errors
Hi!
I've would like to start of saying I'm new and yes, I have searched the forum (and indeed the web) for answers to this question before posting.
Anyway, here goes nothing; I've been trying to get Xcode to run with glfw but it just wont run. I've compiled and installed glfw correctly, and the samples run just fine. However, when I try to compile them in Xcode (after adding agl, carbon and opengl frameworks and the libglfw.a and added the header search path to the build target) I still can't compile.
The errors I get are;
file not found: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE
So I figured I might have to include this framework. Said and done but this only gave me a new one, it was missing a file out of the CoreServices frame work. Added that framework. Done deal? Don't think so. Now it complained about missing files from the ApplicationServices framework again, even though it was added to the project and build target.
Worth mentioning is that I'm not all too familiar with UNIX based systems.
Any form of help would be greatly appreciated as I'm truly at loss here. I have no idea what's wrong and I need to have an application up and running by friday next week.
Cheers!
I've would like to start of saying I'm new and yes, I have searched the forum (and indeed the web) for answers to this question before posting.

Anyway, here goes nothing; I've been trying to get Xcode to run with glfw but it just wont run. I've compiled and installed glfw correctly, and the samples run just fine. However, when I try to compile them in Xcode (after adding agl, carbon and opengl frameworks and the libglfw.a and added the header search path to the build target) I still can't compile.
The errors I get are;
file not found: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE
So I figured I might have to include this framework. Said and done but this only gave me a new one, it was missing a file out of the CoreServices frame work. Added that framework. Done deal? Don't think so. Now it complained about missing files from the ApplicationServices framework again, even though it was added to the project and build target.
Worth mentioning is that I'm not all too familiar with UNIX based systems.

Any form of help would be greatly appreciated as I'm truly at loss here. I have no idea what's wrong and I need to have an application up and running by friday next week.
Cheers!
AGL, Carbon and OpenGL should be sufficient on the framework front.
I'd like to see the exact error message, and the detailed build log (you can get that from the teeny tiny button that looks like a few lines of text below the errors & warnings pane).
I'd like to see the exact error message, and the detailed build log (you can get that from the teeny tiny button that looks like a few lines of text below the errors & warnings pane).
Quote:Linking /Users/niklasfrisk/Documents/C/test/build/Debug/test.app/Contents/MacOS/test (1 error)
file not found: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framework/AE.framework/Versions/A/AE
Command /Developer/usr/bin/gcc-4.0 failed with exit code 1
That's what the debugger says.
Quote:Building target “test†of project “test†with configuration “Debugâ€
Checking Dependencies
ProcessPCH /Library/Caches/com.apple.Xcode.501/SharedPrecompiledHeaders/test_Prefix-gavkszehwdnavqgmqaaiwuumuxhy/test_Prefix.pch.gch test_Prefix.pch normal i386 c com.apple.compilers.gcc.4_0
cd /Users/niklasfrisk/Documents/C/test
/Developer/usr/bin/gcc-4.0 -x c-header -arch i386 -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -fmessage-length=0 -mfix-and-continue -mmacosx-version-min=10.5 -gdwarf-2 -I/Users/niklasfrisk/Documents/C/test/build/test.build/Debug/test.build/test.hmap -F/Users/niklasfrisk/Documents/C/test/build/Debug -F/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks -F/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks -I/Users/niklasfrisk/Documents/C/test/build/Debug/include -I/Users/niklasfrisk/Documents/C/test/../glfw/include -I/Users/niklasfrisk/Documents/C/test/build/test.build/Debug/test.build/DerivedSources -isysroot /Developer/SDKs/MacOSX10.5.sdk -c /Users/niklasfrisk/Documents/C/test/test_Prefix.pch -o /Library/Caches/com.apple.Xcode.501/SharedPrecompiledHeaders/test_Prefix-gavkszehwdnavqgmqaaiwuumuxhy/test_Prefix.pch.gch
CompileC build/test.build/Debug/test.build/Objects-normal/i386/boing.o /Users/niklasfrisk/Documents/C/test/boing.c normal i386 c com.apple.compilers.gcc.4_0
cd /Users/niklasfrisk/Documents/C/test
/Developer/usr/bin/gcc-4.0 -x c -arch i386 -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -fmessage-length=0 -mfix-and-continue -mmacosx-version-min=10.5 -gdwarf-2 -I/Users/niklasfrisk/Documents/C/test/build/test.build/Debug/test.build/test.hmap -F/Users/niklasfrisk/Documents/C/test/build/Debug -F/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks -F/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks -I/Users/niklasfrisk/Documents/C/test/build/Debug/include -I/Users/niklasfrisk/Documents/C/test/../glfw/include -I/Users/niklasfrisk/Documents/C/test/build/test.build/Debug/test.build/DerivedSources -isysroot /Developer/SDKs/MacOSX10.5.sdk -include /Library/Caches/com.apple.Xcode.501/SharedPrecompiledHeaders/test_Prefix-gavkszehwdnavqgmqaaiwuumuxhy/test_Prefix.pch -c /Users/niklasfrisk/Documents/C/test/boing.c -o /Users/niklasfrisk/Documents/C/test/build/test.build/Debug/test.build/Objects-normal/i386/boing.o
Ld /Users/niklasfrisk/Documents/C/test/build/Debug/test.app/Contents/MacOS/test normal i386
cd /Users/niklasfrisk/Documents/C/test
/Developer/usr/bin/gcc-4.0 -o /Users/niklasfrisk/Documents/C/test/build/Debug/test.app/Contents/MacOS/test -L/Users/niklasfrisk/Documents/C/test/build/Debug -L/Users/niklasfrisk/Documents/C/test/../glfw/lib/macosx -F/Users/niklasfrisk/Documents/C/test/build/Debug -F/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks -F/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks -filelist /Users/niklasfrisk/Documents/C/test/build/test.build/Debug/test.build/Objects-normal/i386/test.LinkFileList -framework Carbon -lglfw -framework OpenGL -framework AGL -arch i386 -mmacosx-version-min=10.5 -isysroot /Developer/SDKs/MacOSX10.5.sdk
ld: file not found: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE
collect2: ld returned 1 exit status
And that's the log.
You've got -F/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks and -F/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks. You should have neither. Open your target info, look for "framework search paths" and delete them. You may also need to remove all the frameworks from your project and re-add them, making sure to get the ones from /System/Library/Frameworks, not the ones from the SDKs.
Wahey, thanks a ton!
However, a minor new compile-time error has reared it's ugly head:
Probably something obvious I'm missing. :S
console dump:
Edit: Did some more digging, and when compiled using debug mode i got no errors, however it failed to execute saying:
[Session started at 2008-04-19 01:59:07 +0200.]
dyld: Library not loaded: @executable_path/libglfw.dylib
Referenced from: /Users/niklasfrisk/Documents/C/test/build/Debug/test.app/Contents/MacOS/test
Reason: image not found
The Debugger has exited due to signal 5 (SIGTRAP).The Debugger has exited due to signal 5 (SIGTRAP).
However, a minor new compile-time error has reared it's ugly head:
Quote: cd /Users/niklasfrisk/Documents/C/test
/Developer/usr/bin/gcc-4.0 -o /Users/niklasfrisk/Documents/C/test/build/test.build/Release/test.build/Objects-normal/ppc/test -L/Users/niklasfrisk/Documents/C/test/build/Release -L/Users/niklasfrisk/Documents/C/test/../glfw/lib/macosx -F/Users/niklasfrisk/Documents/C/test/build/Release -filelist /Users/niklasfrisk/Documents/C/test/build/test.build/Release/test.build/Objects-normal/ppc/test.LinkFileList -lglfw -framework AGL -framework Carbon -framework OpenGL -arch ppc -mmacosx-version-min=10.5 -isysroot /Developer/SDKs/MacOSX10.5.sdk
ld: warning in /Users/niklasfrisk/Documents/C/glfw/lib/macosx/libglfw.dylib, file is not of required architecture
Undefined symbols:
"_glfwGetWindowParam", referenced from:
_main in main.o
"_glfwTerminate", referenced from:
_main in main.o
"_glfwInit", referenced from:
_main in main.o
"_glfwSwapBuffers", referenced from:
_main in main.o
"_glfwOpenWindow", referenced from:
_main in main.o
"_glfwGetWindowSize", referenced from:
_RenderScene in main.o
"_glfwSetWindowTitle", referenced from:
_main in main.o
"_glfwGetTime", referenced from:
_DrawGeometry in main.o
"_glfwGetKey", referenced from:
_main in main.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
ld: warning in /Users/niklasfrisk/Documents/C/glfw/lib/macosx/libglfw.dylib, file is not of required architecture
"_glfwGetWindowParam", referenced from:
_main in main.o
"_glfwTerminate", referenced from:
_main in main.o
"_glfwInit", referenced from:
_main in main.o
"_glfwSwapBuffers", referenced from:
_main in main.o
"_glfwOpenWindow", referenced from:
_main in main.o
"_glfwGetWindowSize", referenced from:
_RenderScene in main.o
"_glfwSetWindowTitle", referenced from:
_main in main.o
"_glfwGetTime", referenced from:
_DrawGeometry in main.o
"_glfwGetKey", referenced from:
_main in main.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
Probably something obvious I'm missing. :S
console dump:
Code:
/Users/niklasfrisk/Documents/C/test/main.c: In function 'main':
/Users/niklasfrisk/Documents/C/test/main.c:95: warning: unused variable 'args'
/Users/niklasfrisk/Documents/C/test/main.c:94: warning: unused variable 'UpdateSceneThread'
CompileC build/test.build/Release/test.build/Objects-normal/ppc/main.o /Users/niklasfrisk/Documents/C/test/main.c normal ppc c com.apple.compilers.gcc.4_0
cd /Users/niklasfrisk/Documents/C/test
/Developer/usr/bin/gcc-4.0 -x c -arch ppc -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -Os -mdynamic-no-pic -Wreturn-type -Wunused-variable -fmessage-length=0 -mtune=G5 -fvisibility=hidden -mmacosx-version-min=10.5 -gdwarf-2 -I/Users/niklasfrisk/Documents/C/test/build/test.build/Release/test.build/test.hmap -F/Users/niklasfrisk/Documents/C/test/build/Release -I/Users/niklasfrisk/Documents/C/test/build/Release/include -I/Users/niklasfrisk/Documents/C/test/../glfw/include -I/Users/niklasfrisk/Documents/C/test/build/test.build/Release/test.build/DerivedSources -isysroot /Developer/SDKs/MacOSX10.5.sdk -include /Library/Caches/com.apple.Xcode.501/SharedPrecompiledHeaders/test_Prefix-fnwzdrrvfbkyehfoeaenxiiwxpzm/test_Prefix.pch -c /Users/niklasfrisk/Documents/C/test/main.c -o /Users/niklasfrisk/Documents/C/test/build/test.build/Release/test.build/Objects-normal/ppc/main.o
/Users/niklasfrisk/Documents/C/test/main.c: In function 'main':
/Users/niklasfrisk/Documents/C/test/main.c:95: warning: unused variable 'args'
/Users/niklasfrisk/Documents/C/test/main.c:94: warning: unused variable 'UpdateSceneThread'
Ld /Users/niklasfrisk/Documents/C/test/build/test.build/Release/test.build/Objects-normal/ppc/test normal ppc
cd /Users/niklasfrisk/Documents/C/test
/Developer/usr/bin/gcc-4.0 -o /Users/niklasfrisk/Documents/C/test/build/test.build/Release/test.build/Objects-normal/ppc/test -L/Users/niklasfrisk/Documents/C/test/build/Release -L/Users/niklasfrisk/Documents/C/test/../glfw/lib/macosx -F/Users/niklasfrisk/Documents/C/test/build/Release -filelist /Users/niklasfrisk/Documents/C/test/build/test.build/Release/test.build/Objects-normal/ppc/test.LinkFileList -lglfw -framework AGL -framework Carbon -framework OpenGL -arch ppc -mmacosx-version-min=10.5 -isysroot /Developer/SDKs/MacOSX10.5.sdk
ld: warning in /Users/niklasfrisk/Documents/C/glfw/lib/macosx/libglfw.dylib, file is not of required architecture
Undefined symbols:
"_glfwGetWindowParam", referenced from:
_main in main.o
"_glfwTerminate", referenced from:
_main in main.o
"_glfwInit", referenced from:
_main in main.o
"_glfwSwapBuffers", referenced from:
_main in main.o
"_glfwOpenWindow", referenced from:
_main in main.o
"_glfwGetWindowSize", referenced from:
_RenderScene in main.o
"_glfwSetWindowTitle", referenced from:
_main in main.o
"_glfwGetTime", referenced from:
_DrawGeometry in main.o
"_glfwGetKey", referenced from:
_main in main.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
Ld /Users/niklasfrisk/Documents/C/test/build/test.build/Release/test.build/Objects-normal/i386/test normal i386
cd /Users/niklasfrisk/Documents/C/test
/Developer/usr/bin/gcc-4.0 -o /Users/niklasfrisk/Documents/C/test/build/test.build/Release/test.build/Objects-normal/i386/test -L/Users/niklasfrisk/Documents/C/test/build/Release -L/Users/niklasfrisk/Documents/C/test/../glfw/lib/macosx -F/Users/niklasfrisk/Documents/C/test/build/Release -filelist /Users/niklasfrisk/Documents/C/test/build/test.build/Release/test.build/Objects-normal/i386/test.LinkFileList -lglfw -framework AGL -framework Carbon -framework OpenGL -arch i386 -mmacosx-version-min=10.5 -isysroot /Developer/SDKs/MacOSX10.5.sdkEdit: Did some more digging, and when compiled using debug mode i got no errors, however it failed to execute saying:
[Session started at 2008-04-19 01:59:07 +0200.]
dyld: Library not loaded: @executable_path/libglfw.dylib
Referenced from: /Users/niklasfrisk/Documents/C/test/build/Debug/test.app/Contents/MacOS/test
Reason: image not found
The Debugger has exited due to signal 5 (SIGTRAP).The Debugger has exited due to signal 5 (SIGTRAP).
Your GLFW is built intel-only, but Xcode is trying to make a UB. Either disable PowerPC in your Xcode project, or build GLFW as a UB.
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| GLFW Xcode 3 Problems | Matt328 | 0 | 1,950 |
Nov 21, 2008 05:55 AM Last Post: Matt328 |
|
| Setting OpenGL & GLFW on my new mac! | AdrianM | 3 | 3,266 |
Oct 12, 2008 07:24 AM Last Post: AdrianM |
|
| libpng with OpenGL : return what? | Jones | 3 | 3,469 |
May 28, 2006 07:32 AM Last Post: Jones |
|
| GLFW and Xcode | Xentery | 7 | 4,783 |
Mar 9, 2006 12:56 PM Last Post: akb825 |
|
| Return the pixel position of a model | alert | 1 | 2,350 |
Jan 18, 2005 11:20 AM Last Post: ThemsAllTook |
|

