Thursday, September 3, 2009

iPhone Development on Win32 Redux (build error log)

I was trying to build the iPhone toolchain according to "PJ Cabrera's - Write native iPhone applications using Eclipse CDT" article. I made it pretty far with some minor hiccups. I know there is a lot of noise in this blog entry, but I wanted to post the error in case it comes up again. As of yet, I still haven't gotten the win32/iphone/opengl examples to work. Plus, I have the issue of a simulator. The simulator doesn't exist for win32.

Yea, your best bet is to just get a Mac and do iPhone development on it.

You can view the current source here:

Error 2 (OpenGL)

OK, I was able to build an application, I had some issues with OpenGL apps.

/usr/local/bin/arm-apple-darwin9-gcc -c -I/usr/local/lib/gcc/arm-apple-darwin9/4.2.1/include -isysroot /usr/local/iphone-sysroot HelloWorld.m -o HelloWorld.o
In file included from HelloWorldApp.h:11,
from HelloWorld.m:11:
/usr/local/iphone-sysroot/usr/include/OpenGLES/EAGL.h:27: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'EAGLRenderingAPI'
/usr/local/iphone-sysroot/usr/include/OpenGLES/EAGL.h:59: error: expected ')' before 'EAGLRenderingAPI'
/usr/local/iphone-sysroot/usr/include/OpenGLES/EAGL.h:60: error: expected ')' before 'EAGLRenderingAPI'
/usr/local/iphone-sysroot/usr/include/OpenGLES/EAGL.h:65: error: expected specifier-qualifier-list before 'EAGLRenderingAPI'
make: *** [HelloWorld.o] Error 1

Error 1:

OK, to fix the one error there, I need to make sure that the symbolic links for some of the gcc libraries were correct.

Here is the script to correct this problem:

But, now I am stumped again, here is the trace of the Makefile output: Anyone have any ideas?

/usr/local/bin/arm-apple-darwin9-gcc -framework CoreFoundation -framework Foundation -framework UIKit -lobjc -bind_at_load -isysroot /usr/local/iphone-sysroot -o HelloWorld HelloWorld.o HelloWorldApp.o
/usr/local/bin/arm-apple-darwin9-ld: /usr/local/iphone-sysroot/usr/lib/libstdc++.6.dylib truncated or malformed object (mach header extends past the end of the file)
/usr/local/bin/arm-apple-darwin9-ld: warning multiple definitions of symbol _NSStreamDataWrittenToMemoryStreamKey
make: *** [HelloWorld] Error 1

1 comment:

Hire iphone developer said...

Useful information, many thanks to the author. It is puzzling to me now, but in general, the usefulness and significance is overwhelming. Very much thanks again and best of luck!

Hire Web Developer