Build cocos2dx in VMWare Macos for Iphone

I have just learned cocos2dx for a few days. I use Window 10 to code a simple game. Then build. Everything is good. The game run well. But then i copy my project folder to my mac (VMWare machine) and build, it show me some prolem, i searched a lot but i can’t find any solution for this.

When i build my game to my iphone (iphone 5s). It’s all fine. But then i run my game (I already trust my game) it just crash. (It’s working fine one window before)
When i build my game to my mac, it showing some error like this

And i have one question that i searched alot to but can’t find any answer. That if i create project in window, then code in window. After everything done. Then just copy project to mac and use xcode to build for ios. Or i have to install cocos, sdk, ndk, ant for ios to.

Thank you all.

The error is: Failed to find a suitable pixel format
Since you are developing in a virtual machine, I would check and see what video driver is being used. You need to use one that supports a recent version of OpenGL.

Also, What OS X version and XCode version are you using?

Hi slackmoehrle, im using cocos2d-x-3.13.1 in Macos sierra 10.12 and XCode 8.
I just test to build a helloworld project (just create new project) to my iphone and it work @@.

hi cuongli120394 , i just wanted to let you know that if you are using OS X in Vmware you do not have QE enabled because there are no drivers for it. QE means Quartz Extreme and it provides 3D graphics acceleration for the OS. Because of the fact that there are no 3D drivers for OS X in vmware or any other virtualization machine, your development is limited to using just 2D content with no openGL stuff. The Metal Framework is out of the question.

You might want to try building a hackintosh as an alternative. I did it before and it works just like a regular Mac, but it is hard to find the matching software with the hardware on the first installation of the OS on non apple hardware.

Hi ben26, thank you very much. I’ll try to building a hackintosh. Hope it work :D…

By the way, my project after compile is up to 4.6GB. @@ Am i doing something wrong ? I think when i compile, cocos copy something to myproject/cocos2d folder @@… And it take may be 20-30 minutes to finish @@

I answered this in your other post.

@cuongli120394, building a hackintosh is very time consuming.

Firstly, you have to make sure you have the right hardware and it should be as close as the hardware you can find on a mac. If you have an intel CPU with integrated graphics there are very high chances it will work.
Secondly, you need the right bootloader and the corresponding kexts.

I gave up hackintoshing and just bought a mac. If you want I can compile your project on my mac.

I am wondering if you used Box2D in your game. I am asking you about it because whenever I use joints to make a character it works well on the web when using cocos2dx with JavaScript but when I compile it for android or iphone it always shows a black screen.