Android Development
Alvin Beach
alvinbeach at gmail.com
Wed Nov 20 17:17:40 GMT 2013
On 20/11/13 13:14, Milian Wolff wrote:
> On Wednesday 20 November 2013 12:02:41 Alvin Beach wrote:
>> Thank you Milian, the IN_IDE_PARSER and IN_KDEVELOP_PARSER is exactly what I
>> was looking for. One little issue is that I need to edit the "system" file
>> for KDevelop see the code.
>>
>> I have this:
>>
>> #if defined(IN_IDE_PARSER) || defined(IN_KDEVELOP_PARSER)
>> #define __ANDROID__ 1
>> #endif
>>
>> When I have the above in my .cpp file, before the inclusion of the other
>> header files, KDevelop doesn't seem to carry it over to (into) the included
>> header files. For instance, the functions I would like KDevelop to see are
>> in SDL_system.h. If I take the above guard and put it in SDL_system.h, the
>> KDevelop "sees" code in SDL_system.h and in my .cpp file. Simply putting
>> the guard before my inclusion of SDL_system.h doesn't see to work. Perhaps
>> this is the way it is suppose to work or am I doing something wrong?
>
> The simplest way to ensure that this works as you intend to, is to hack it
> into KDevelop sources: languages/cpp/setuphelpers.cpp -> setupStandardMacros()
>
> Then add something like
>
> {
> rpp::pp_macro m("__ANDROID__");
> m.setDefinitionText( "1" );
> insertMacro( macros, m );
> }
>
> Bye
Thank you Milian for the suggestion. I think I will avoid that (for now). By "system" file, I really
mean the source local to my jni/. In this case, SDL2 which is local to my project. I wanted to avoid
editing the original SDL2 library sources (compiled each time I build the app). However, I think
that is a suitable solution for now.
Many thanks!
Cheers,
Alvin
More information about the KDevelop
mailing list