Hi. I want to do development on visual studio. I followed the steps called.
With visual studio installer I installed ANT NDK vs SDK.
then I did the cocos2dx installation. I can create a game file. But I can’t compile this in visual studio. I’ve always tried a lot of ways that gives error.
what should I do?
Looks like you’re trying to build for Android using Visual Studio. Any reason you don’t develop your app using the Win32 project, and then just compile it for Android using Android Studio?
I don’t understand what you mean. do I develop my cocos2dx game like desktop app on visual studio? and then do I need to build my cocos2dx game for android in android studio?
The majority of the code you will be writing is platform independent. You can create the game as a desktop application using Visual Studio, run it, test it etc. Once you know it works, then it should require very little additional changes to compile it for Android using Android Studio.
So, yes, they are separate builds, one for each platform. If you also need it for iOS, then you compile the same source code in Apple’s Xcode IDE.
For an example, look at the cpp-tests project that’s in the /tests/ folder of your Cocos2d-x installation. You’ll notice all the code is in cpp-tests/Classes, and it’s the same code for all platforms.
okey thanks. win32 version of my project is built and running. i will develop my project through the win32 project and then do the compilation on android studio. do I need to do something extra for this? can every c ++ libraries be compatible with both platforms?
Firstly, it’s your app, so if you need something specific from Android or iOS, then you need to implement it. Secondly, regarding the C++ libraries being compatible across platforms, that depends on the library you’re using.
I’m a little surprised you’re asking such questions, since you’re working with C++, so you must already know enough about programming. Perhaps you should consider reading up on cross platform development to see what you’re getting yourself into.