Reputation: 1398
Hello I am making a game for both computer and android devices and i was wondering if there was a way to link the two projects so that i would type the code once and have it saved to both projects because copying and pasting is such a hastle...
P.S. The code for both is almost completly identical.
Upvotes: 0
Views: 37
Reputation: 3112
The simplest method is to simply import source code into each project.
So, let's say I have source code at C:/dev/c/game
You have several import options.
Do a File->Import->C/C++ and select Existing code as a makefile project. Then browse to the source folder. Repeat similar steps for Android, java, etc projects.
Link source files in your project with existing files.
All of these should easily enable cross platform sharing of source code where edits in one will be immediately reflected in the other project.
If you use version control, it's even easier. You can checkout the same source file into different projects (or nest the same independently version controlled source file into different version controlled projects).
Upvotes: 1