09-26-2012 09:11 AM
I'm trying to port my existing game project to BlackBerry Playbook using NDK, but unfortunately there is an issue that I don't know how to fix.
My code base requires the force include option (header file that should be included in every other source file implicitly). I used the -include GCC command for Android OS and used precompiled header for iOS.
Here on BlackBerry I can't find precompiled header option so I tried to use -include command too. For that purpose I navigated to the project's Properties -> C/C++ Build -> Settings -> Tool Settings tab and there under the QCC Compiler -> Extra Options -> Preprocessor Options (-Wp,) I added -include path.to.my.file option.
immediately after that I started to get the error message:
cc: Can't specify -P, -C, -E, -c or -S with -o and have multiple files
And sadly I have no idea how to fix this problem...
Did someone encounter the same one? Or if you know the valid approach to implement force includes, please, let me know!
Solved! Go to Solution.
10-02-2012 12:01 PM
Properties -> C/C++ Build -> Settings -> Tool Settings-> QCC Compiler ->
And there in Preprocessor section (-I [it is capital Ai not El]) specify list of folders you want the compiler to search for include files in.
10-02-2012 12:07 PM
10-02-2012 12:23 PM
Ok, sorry... misunderstood your requirements.
The easiest way is just to add one file to your sources
Then include myincludes.h wherever needed in your source files.
10-02-2012 12:39 PM