a strange android comilation error

Hi, if you try to run a test,with pure mvc framework, it works fine when targeting flash, but generates a strange error when targeting android: - ln178: /Users/tenso/Projects/TestBase/TestBase/./src/application/TouchFacade.cpp(-1): Error: instantiate…

Viewing 1 to 4 (4 Total)
a strange android comilation error

LeFabrice

LeFabrice
Total Posts: 34
Joined: April 02, 2012

Hi, if you try to run a test,with pure mvc framework, it works fine when targeting flash, but generates a strange error when targeting android:

- ln178: /Users/tenso/Projects/TestBase/TestBase/./src/application/TouchFacade.cpp(-1): Error: instantiated from here (TestBase)
- ln 89: /Users/tenso/Projects/TestBase/TestBase/./src/application/TouchFacade.cpp(-1): Error: instantiated from here (TestBase)
- ln 92: /Users/tenso/Projects/TestBase/TestBase/include/org/puremvc/haxe/patterns/facade/Facade.h(-1): Error: note: candidates are: virtual Void org::puremvc::haxe::patterns::facade::Facade_obj::sendNotification(String, Dynamic, String) (TestBase)
- Error: Source path "Export/android/obj/libApplicationMain-debug.so" does not exist (TestBase)

Anybody knows where this error comes from?
Is pureMVC compatible with NME ?
If not, what in the puremvc package has to be corrected?


here is the TouchFacade.hx class:

import org.puremvc.haxe.patterns.facade.Facade;

class TouchFacade extends Facade{

static private var _instance:TouchFacade;

static public function getInstance():TouchFacade {
if( _instance == null ) _instance = new TouchFacade();
return _instance;
}

public function new () {

super();

}

public function run():Void {
trace("run");
}

override private function initializeController():Void {
super.initializeController();

}

override private function initializeModel():Void {
super.initializeModel();

}

override private function initializeView():Void {
super.initializeView();

}

}

Tags:
Posted on May 02, 2012 at 4:23 AM

Huge

Huge
Total Posts: 548
Joined: October 07, 2011

Re: a strange android comilation error

Hi,
This looks like a bug in the cpp code generation - perhaps to do with default arguments in interface definitions?
You could try deleting the generated source directories and compiling again.

Hugh

Posted on May 02, 2012 at 11:35 PM

LeFabrice

LeFabrice
Total Posts: 34
Joined: April 02, 2012

Re: a strange android comilation error

hi, i tried, but unfortunately, it didn't solve the problem, still have the same errors:

In file included from include/org/puremvc/haxe/patterns/facade/Facade.h:8,
from include/application/TouchFacade.h:8,
from ./src/application/TouchFacade.cpp:4:
include/org/puremvc/haxe/interfaces/IFacade.h: In member function 'Void org::puremvc::haxe::interfaces::IFacade_delegate_<IMPL>::sendNotification(String, Dynamic, hx::Null<String>) [with IMPL = org::puremvc::haxe::patterns::facade::Facade_obj]':
./src/application/TouchFacade.cpp:178: instantiated from here
include/org/puremvc/haxe/interfaces/IFacade.h:89: error: no matching function for call to 'org::puremvc::haxe::patterns::facade::Facade_obj::sendNotification(String&, Dynamic&, hx::Null<String>&)'
include/org/puremvc/haxe/patterns/facade/Facade.h:92: note: candidates are: virtual Void org::puremvc::haxe::patterns::facade::Facade_obj::sendNotification(String, Dynamic, String)
Called from ? line 1
Called from BuildTool.hx line 1246
Called from BuildTool.hx line 554
Called from a C function
Called from BuildTool.hx line 591
Called from BuildTool.hx line 710
Called from BuildTool.hx line 746
Called from BuildTool.hx line 200
Uncaught exception - Error : 256 - build cancelled
Error: Source path "Export/android/obj/libApplicationMain-debug.so" does not exist



As i had the same error with some classes i was writing, i finally i found what causes this error: it's when you have a function of this type:

someMethod(someParam:String = null):Void { ... } (generates compilation error for Android)

i could correct the errors by replacing the previous line by

someMethod(someParam:String = "none"):Void { ... } (ok for Android)

strange isn't it?
I think we could say it's a bug

Posted on May 03, 2012 at 3:00 AM

Huge

Huge
Total Posts: 548
Joined: October 07, 2011

Re: a strange android comilation error

Hi,
You could try this fix while I think about the best way to fix this:

http://code.google.com/p/hxcpp/issues/detail?id=168...

Hugh

Posted on May 03, 2012 at 11:36 PM