Reputation: 4431
got errors like: ld: warning: directory not found for option '-L/Users/lichallenger/Downloads/Safari_Download/OpenGL ES 2.0 Programming Guide[pdf及源代码]/opengles-book-samples-read-only/iPhone/Chapter_2/Hello_Triangle/../../Common/build/Debug-iphonesimulator' Undefined symbols for architecture i386: "_CGImageGetWidth", referenced from: _esLoadPNG in ImageUtils.o "_CGImageGetHeight", referenced from: _esLoadPNG in ImageUtils.o "_CGColorSpaceCreateDeviceRGB", referenced from: _esLoadPNG in ImageUtils.o "_CGBitmapContextCreate", referenced from: _esLoadPNG in ImageUtils.o "_CGColorSpaceRelease", referenced from: _esLoadPNG in ImageUtils.o "_CGContextClearRect", referenced from: _esLoadPNG in ImageUtils.o "_CGContextTranslateCTM", referenced from: _esLoadPNG in ImageUtils.o "_CGContextDrawImage", referenced from: _esLoadPNG in ImageUtils.o "_CGContextRelease", referenced from: _esLoadPNG in ImageUtils.o ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)
Upvotes: 0
Views: 942
Reputation: 9544
It looks like you need to include/add the CoreGraphics library in your frameworks.
Upvotes: 4