File extension override for Android build w/C++? [message #670210] |
Fri, 13 May 2011 04:00 |
Tom Hudson Messages: 5 Registered: October 2010 |
Junior Member |
|
|
I'm porting an iPhone app over to Android and want to set up the development so the same source files are used between the iPhone OS and Android builds, with the builds controlled by a couple of #defines. This simplifies my project because I can use the same files in my code repository in both builds.
Some of the source files from the iPhone project are Objective-C (.mm) but with my #defines in place these are essentially .cpp files that should compile fine on the Android side, but the build fails with an "Android NDK: WARNING: Unsupported source file extensions..." for these files, and despite the fact that it's just a "warning", the files are not compiled.
I had thought that I could tell Eclipse that these .mm files should be treated like .cpp files and in fact set up the project's C++ General preference to have .mm as a C++ source file, but this apparently does nothing.
Is there a way to tell Eclipse that a .mm file is in fact a .cpp file and should be treated that way?
I suppose my other option is to rework the iPhone project so that all that code is moved into .cpp files, with the objective-C stuff split off separately, but that would be a ton of work and possibly break some things -- sure would be nice to just have Eclipse ignore those file types and accept them as .cpp.
I'd appreciate some input as to whether or not this is doable. Thanks!
|
|
|
Powered by
FUDForum. Page generated in 0.02815 seconds