Android compilation error r4104

Problems compiling the game? Ask Here

Android compilation error r4104

Postby me123 » Fri Dec 16, 2011 4:32 pm

I'm currently on r4110 and the Android build fails in GameOptions.cpp.

To fix it i removed the conditional, ie:
Code: Select all
    // show keyboard
#ifdef IOS
    JGE *engine = JGE::GetInstance();
    engine->SendCommand( "displayKeyboard", input);
#elif ANDROID
    JGE *engine = JGE::GetInstance();
    engine->SendCommand( "displayKeyboard:" << input);   
#endif


to:

Code: Select all
    // show keyboard
    JGE *engine = JGE::GetInstance();
    engine->SendCommand( "displayKeyboard", input);


after that the build and resulting apk work again.

P.S.: Thanks for Wagic, I used it since the first PSP release. Would it be possible to include onLongClick()? One use might be for undo / "remove from battle" actions.
me123
 
Posts: 2
Joined: Fri Dec 16, 2011 4:08 pm

Re: Android compilation error r4104

Postby mnguyen » Sat Dec 17, 2011 4:26 am

No I think I made a mistake in the ifdef if that is the case. Perhaps we change it to the following: that way the callback is using the current Android signature. The iOS signature for SendCommand was newly introduced. I don't want to merge the two until there is a need.

me123 wrote:I'm currently on r4110 and the Android build fails in GameOptions.cpp.

To fix it i removed the conditional, ie:
Code: Select all
    // show keyboard
#ifdef IOS
    JGE *engine = JGE::GetInstance();
    engine->SendCommand( "displayKeyboard", input);
#elif
    JGE *engine = JGE::GetInstance();
    engine->SendCommand( "displayKeyboard:" << input);   
#endif


to:

Code: Select all
    // show keyboard
#ifdef IOS
    JGE *engine = JGE::GetInstance();
    engine->SendCommand( "displayKeyboard", input);
#elifdef
    JGE *engine = JGE::GetInstance();
    engine->SendCommand( "displayKeyboard:" << input);   
#endif

mnguyen
 
Posts: 222
Joined: Thu Apr 29, 2010 4:13 pm

Re: Android compilation error r4104

Postby me123 » Mon Dec 19, 2011 8:48 am

I'm sorry. I should have included the error message:

Code: Select all
Compile++ thumb  : main <= GameOptions.cpp
jni/../jni/../../../../projects/mtg//src/GameOptions.cpp: In member function 'SimplePad* GameSettings::keypadStart(std::string, std::string*, bool, bool, float, float)':
jni/../jni/../../../../projects/mtg//src/GameOptions.cpp:855: error: no match for 'operator<<' in '"displayKeyboard:" << input'
jni/../jni/../../../../projects/mtg//include/MTGGameZones.h:205: note: candidates are: std::ostream& operator<<(std::ostream&, const MTGPlayerCards&)
jni/../jni/../../../../projects/mtg//include/MTGGameZones.h:204: note:                 std::ostream& operator<<(std::ostream&, const MTGGameZone&)
jni/../jni/../../../../projects/mtg//include/CardDisplay.h:31: note:                 std::ostream& operator<<(std::ostream&, const CardDisplay&)
jni/../jni/../../../../projects/mtg//include/WEvent.h:259: note:                 std::ostream& operator<<(std::ostream&, const WEvent&)
jni/../jni/../../../../JGE/include/JGui.h:125: note:                 std::ostream& operator<<(std::ostream&, const JGuiObject&)
make: *** [obj/local/armeabi/objs-debug/main/__/__/__/__/projects/mtg//src/GameOptions.o] Fehler 1


I have to admit, that my knowledge of C++ is limited, but the following worked for me:
Code: Select all
engine->SendCommand( "displayKeyboard:" + input);
me123
 
Posts: 2
Joined: Fri Dec 16, 2011 4:08 pm

Advertising


Return to Compilation & Sources

Who is online

Users browsing this forum: No registered users and 0 guests