Forked cocos2d-x in github, made a marmalade_support branch from the latest release tag, committed and pushed styck’s changes, and added a few trivial commits.
After commmenting out libjpeg from Marmalade/6.0/modules/iwutil/iwutil.mkf, I was able to successfully build HelloWorld and tests from MSVC 10 in x86, Debug and Release. In the Debug build, both projects fail the same runtime assertion twice on startup, listed below, but both seem to mostly work afterward.
Expression: g_IwGLAllowNegativeLocations || (location >= 0)
Message: Negative location (–1) passed to glUniform. This is allowed by the OpenGL ES 2.x spec and will be ignored, but may indicate problems in the application. Use [GL] AllowNegativeUniformLocation=1 to disable this warning.
ParticleTest fails a couple more assertions and then crashes. A cursory browse of some of the other tests suggests they’re working; I’ll try running them all and comparing behavior to the win32 project.
Both HelloWorld and tests crash with an unhandled exception on close.
Building for GCC (ARM) results in some failures. One was easy to fix (name conflict between a log2 macro in Marmalade and a log2 function in ActionsTest), but there is at least one problem that may be non-trivial to solve. Marmalade #defines INLINE, and both libjpeg8d and libxml2 expect to use INLINE with their own definition. This produces the following errors/warnings in my environment:
e:/cocos2d-x/cocos2dx/platform/third_party/marmalade/libjpeg8d/jchuff.c(306): error : duplicate ‘static’
(and similar errors elsewhere in the file)
e:/cocos2d-x/cocos2dx/platform/third_party/marmalade/libxml2/sources/HTMLparser.c(621): warning : “INLINE” redefined
e:/marmalade/6.0/s3e/h/s3eTypes.h(317) : note: this is the location of the previous definition
I’m also getting an error about not finding arm/arch.h, but I’m going to assume that’s a problem with my build environment until I can prove otherwise.
Will see how much of this I can solve this week.