Has anyone come across this problem when building with cocos2d (OpenGL library for iPhone 2D games)?
"glui/GL/glui.h" file is not found
gluOrtho2D was not declared
GL_COLOR_BUFFER_BIT was not declared.
There seems to be very little info on GLUI for iPhone on the web. I am new to OpenGL, so appreciate the help! I have included OpenGLES CoreGraphics libraries, even tried adding linker flag "-framework GLUI" but to no avail.
Thanks!
I solved this problem by
removing cocos2d's external/Box2d/Testbed directory
adding GLUI.framework from /Library/Frameworks/GLUI.framework (and setting the framework search path)
It compiles successfully, but dies on launching in simulator with this error, which seems unrelated to the question above.
dyld: Symbol not found: _CFXMLNodeGetInfoPtr
Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security
Expected in: /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.1.2.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation in /System/Library/Frameworks/Security.framework/Versions/A/Security
I was finally able to get this working by following a different tutorial. The Monocles tutorial is outdated since it uses cocos2d v.0.7.2.
There has been significant change to cocos2d v.0.8, which comes pre-packaged with an easy to use XCode Project Template, and in v.0.9, libraries filenames have been further improved with the CC prefix to avoid namespace collision. I would recommend this tutorial instead:
http://iphonedev.net/2009/07/12/cocos2d-example-box2d/
Also found this to be useful.
http://www.mycodestudio.com/blog/2009/12/06/cocos2dpt1/
Related
what is the true reason for the "Undefined symbols for architecture i386:" errors that occur?
It appears way too often with various libraries...
Regards
Mirza
Sometimes you need to link with frameworks that are included in the iOS sdk (QuartzCore or CoreData for example). When you're trying to use a class or object of that framework, and you haven't linked it, you're getting the undefined symbols error.
The build error I am getting is:
ld: library not found for -lAdServer_Iphone
I have experience in making apps from scratch. However the issue I am having is not having enough experience importing existing apps and making them work.
Would someone be able to give me some clarity on this?
Thank You
The error means that you did not copy the library called 'IAdServer_iPhone' to the proper location. To fix this, either get the location the project is linking to and copy the library there, or you can reimport the library from the new location.
I'm using Matt Gallagher's Audio Streaming Project. I downloaded the code/project and it runs/compiles/links just fine.
The problem is when I try to integrate the AudioStreamer class into my own project. I added all the necessary frameworks and checked over the project settings to make sure they match Matt's project as much as possible.
I haven't added any of Matt's code yet (except for the AudioStreamer class). All I'm doing for now is defining this function:
- (void)createStreamer {
streamer = [[AudioStreamer alloc] initWithURL:audiourl];
}
If I comment out the only line in that function the project compiles/links fine. If I leave that line there I get this error (which if I understand correctly is a linker error):
"_OBJC_CLASS_$_AudioStreamer", referenced from:
objc-class-ref-to-AudioStreamer in AudioViewController.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
I googled this error and most people get it because they forgot to include a certain framework. I have all the frameworks I need in my project.
Does anyone know any other reason why this error could occur? Is there some setting that I may be overlooking?
Most of the project settings are the same except for the build architecture being set to arm6,arm7 in Matt's project and i386 on mine. I tried compiling for both simulator and device and I get the same error.
The only thing I could think of is that Matt's project is dated 2009 (pretty old) so maybe something changed in the default configuration in the new xcodes?
If anyone can provide any insight I'd appreciate it.
Thanks.
It sounds like you need to add AudioStreamer.m to your target.
I'm getting the following error when I attempt to compile my XCode project to debug on my device.
No architectures to compile for (ARCHS=x86_64, VALID_ARCHS=armv6 armv7).
I've included ObjectiveFlickr in my project just as the readme describes. I've gone through the process several times and redownloaded objectiveFlickr a few times to start over.
I've gotten objectiveFlickr to work on devices in the past. I don't know why I am suddenly having trouble. Can anybody point me to something that might hold the clue I need? Any other info I need to provide? I made only changes to my project that are specified by the OF documentation.
I also get this error when compiling the included snap-n-run example project provided with OF. So I must be missing something beneath my project.
Thanks,
Charlie
Check out this post for another solution. I have not tested it for release/dist but it works for debug so far.
http://groups.google.com/group/objectiveflickr/browse_thread/thread/ad8e5ec6ba976672
Well, I wasn't able to truly solve this problem. However, after corresponding with Lukhanos, the creator of objflickr, I tried including the objflickr source code directly in my project. After a bit of trial and error to sort out which source files were needed (the "source" directory and the "LFWebAPIKit" directory) and adding the "SystemConfiguration" framework to my project, things are building OK.
Still no clue as to why I was experiencing this issue, but at least I can get my project built now!
Thanks
- Charlie
Been banging my head agains the wall for awhile now.
My Xcode project went a little haywire while refactoring, and refused to build. I've squashed all the other errors, except one last linktime error:
Framework not found AudioUnit
I have the AudioUnit headers, the AudioUnit.framework is included in my project as it was before (Targets > Get Info > General > Linked Libraries > + ), but I cannot figure out why it does not work now. AudioToolbox.framework is also included.
Remove AudioUnit.framework and add CoreAudio.framework
Helped for me: removing AudioUnit.framework, then adding AudioToolbox.framework, Clean, Build
In my case compiler lies about AudioUnit, in fact for project was required only AudioToolbox.framework.
I had already tried swapping out all available audio frameworks (AudioToolbox, CoreAudio and AudioUnit) and no configuration worked. Something funky with Xcode was going on.
I reinstalled Xcode and migrated the code to a new project. Now it builds fine with the exact same frameworks as I had before. A frustrating solution, but a working one nonetheless.