Sorry about creating that additional thread. I thought that I had hit reply.
Those changes made it compile.
Just to have the thread complete. This is what my current Config.pp looks like:
#define BUILD_IPHONE iPhoneOS
#define IOS_SDK_VERSION 4.2
#define OSX_DEV_ROOT Developer
#define HAVE_GLES 1
#define GLES_LIBS
#define HAVE_GLES2 1
#define GLES2_LIBS
#define LINK_ALL_STATIC 1
#define HAVE_FREETYPE
#define HAVE_GL
#define HAVE_OPENSSL
#define HAVE_PYTHON
#define HAVE_TINYDISPLAY
#define HAVE_WX
================
Notes
#define IOS_SDK_VERSION 4.2 <- I added this to control the SDK_VERSION
#define OSX_DEV_ROOT Developer <- I added this because I have Xcode4 installed on my machine, plus developers may not always have Xcode located in /Developer.
I went ahead and enabled GLES1 also, that way I can drop down to GLES1 if necessary.
I also had to modify the PostConfig.pp file in Panda3D/dtool/pptempl to be this:
// This file is included after including all of $DTOOL/Config.pp and
// the user’s personal Config.pp file. It makes decisions necessary
// following the user’s Config settings.
#if [and [OSX_PLATFORM],[BUILD_IPHONE]]
//#define IOS_PLATFORM iPhoneSimulator
#define IOS_PLATFORM [BUILD_IPHONE]
#if [eq [IOS_PLATFORM], iPhoneOS]
#define ARCH_FLAGS -arch armv7 -mno-thumb
#define osflags -fpascal-strings -miphoneos-version-min=4.0
#define DEBUGFLAGS -gdwarf-2
#elif [eq [IOS_PLATFORM], iPhoneSimulator]
#define ARCH_FLAGS -arch i386
#define osflags -x objective-c -fmessage-length=0 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -fexceptions -fvisibility=hidden -mmacosx-version-min=10.6 -gdwarf-2 -fobjc-abi-version=2 -fobjc-legacy-dispatch -D__IPHONE_OS_VERSION_MIN_REQUIRED=40200
#define DEBUGFLAGS -gdwarf-2 -DDEBUG
#else
#error Inappropriate value for BUILD_IPHONE.
#endif
#define xcode [OSX_DEV_ROOT]
#define dev /[xcode]/Platforms/[IOS_PLATFORM].platform/Developer
#define env env MACOSX_DEPLOYMENT_TARGET=10.6 PATH="[dev]/usr/bin:/[xcode]/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
#define CC [env] [dev]/usr/bin/gcc
#define CXX [env] [dev]/usr/bin/g++
#define OSX_CDEFS __IPHONE_OS_VERSION_MIN_REQUIRED=40000
#define OSX_CFLAGS -isysroot [dev]/SDKs/[IOS_PLATFORM][IOS_SDK_VERSION].sdk $[osflags]
#defer ODIR_SUFFIX -$[IOS_PLATFORM]
#endif
A couple more questions: Is there a way to change the output directory for the simulator builds?
I want to be able to specify something like /usr/local/panda3d/$[IOS_PLATFORM]/include /lib
That way I can change the Xcode config to look in the right place depending on the build type.
Additionally, I would like the ability to do fatbinaries, How can I make it build for two different architectures?
Let me know if you want the PostConfig.pp, in patch format. If so, would you send the command to generate a patch file against cvs.
Thanks for the help