Using a Function pointer errors with hxcpp

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Using a Function pointer errors with hxcpp

WedgeMan
This post has NOT been accepted by the mailing list yet.
Hi All,

I have the following haxe code which works perfectly when running for Flash but fails when running for Windows as Native C++.

HaXe Code:

private var __callback:Int->Void;


public function getCallback() : Int->Void {
        return __callback;
}

public function setCallback(_callback : Int->Void) : Void {
        __callback = _callback;
}

Error:

c:\motion-twin\haxe\lib\hxcpp\2,08,0\include\Array.h(384) : error C2146: syntax
error : missing ';' before identifier '__shift'
c:\motion-twin\haxe\lib\hxcpp\2,08,0\include\Array.h(384) : error C2433: 'Array_
obj<ELEM_>::Dynamic' : 'virtual' not permitted on data declarations
        with
        [
            ELEM_=String
        ]
c:\motion-twin\haxe\lib\hxcpp\2,08,0\include\Array.h(384) : error C4430: missing
 type specifier - int assumed. Note: C++ does not support default-int
c:\motion-twin\haxe\lib\hxcpp\2,08,0\include\Array.h(384) : error C4430: missing
 type specifier - int assumed. Note: C++ does not support default-int
c:\motion-twin\haxe\lib\hxcpp\2,08,0\include\Array.h(384) : warning C4183: '__sh
ift': missing return type; assumed to be a member function returning 'int'
c:\motion-twin\haxe\lib\hxcpp\2,08,0\include\Array.h(385) : error C2146: syntax
error : missing ';' before identifier '__slice'
c:\motion-twin\haxe\lib\hxcpp\2,08,0\include\Array.h(385) : error C2433: 'Array_
obj<ELEM_>::Dynamic' : 'virtual' not permitted on data declarations
        with
        [
            ELEM_=String
        ]
c:\motion-twin\haxe\lib\hxcpp\2,08,0\include\Array.h(385) : error C4430: missing
 type specifier - int assumed. Note: C++ does not support default-int
c:\motion-twin\haxe\lib\hxcpp\2,08,0\include\Array.h(385) : error C4430: missing
 type specifier - int assumed. Note: C++ does not support default-int
c:\motion-twin\haxe\lib\hxcpp\2,08,0\include\Array.h(385) : error C2143: syntax
error : missing ',' before '&'
c:\motion-twin\haxe\lib\hxcpp\2,08,0\include\Array.h(385) : error C4430: missing
 type specifier - int assumed. Note: C++ does not support default-int
c:\motion-twin\haxe\lib\hxcpp\2,08,0\include\Array.h(385) : warning C4183: '__sl
ice': missing return type; assumed to be a member function returning 'int'
c:\motion-twin\haxe\lib\hxcpp\2,08,0\include\Array.h(386) : error C2146: syntax
error : missing ';' before identifier '__splice'
c:\motion-twin\haxe\lib\hxcpp\2,08,0\include\Array.h(386) : error C2433: 'Array_
obj<ELEM_>::Dynamic' : 'virtual' not permitted on data declarations
        with
        [
            ELEM_=String
        ]
c:\motion-twin\haxe\lib\hxcpp\2,08,0\include\Array.h(386) : error C4430: missing
 type specifier - int assumed. Note: C++ does not support default-int
c:\motion-twin\haxe\lib\hxcpp\2,08,0\include\Array.h(386) : error C4430: missing
 type specifier - int assumed. Note: C++ does not support default-int
c:\motion-twin\haxe\lib\hxcpp\2,08,0\include\Array.h(386) : error C2143: syntax
error : missing ',' before '&'
c:\motion-twin\haxe\lib\hxcpp\2,08,0\include\Array.h(386) : error C4430: missing
 type specifier - int assumed. Note: C++ does not support default-int
c:\motion-twin\haxe\lib\hxcpp\2,08,0\include\Array.h(386) : warning C4183: '__sp
lice': missing return type; assumed to be a member function returning 'int'
c:\motion-twin\haxe\lib\hxcpp\2,08,0\include\Array.h(387) : error C2146: syntax
error : missing ';' before identifier '__sort'
c:\motion-twin\haxe\lib\hxcpp\2,08,0\include\Array.h(387) : error C2433: 'Array_
obj<ELEM_>::Dynamic' : 'virtual' not permitted on data declarations
        with
        [
            ELEM_=String
        ]
c:\motion-twin\haxe\lib\hxcpp\2,08,0\include\Array.h(387) : error C4430: missing
 type specifier - int assumed. Note: C++ does not support default-int
c:\motion-twin\haxe\lib\hxcpp\2,08,0\include\Array.h(387) : error C4430: missing
 type specifier - int assumed. Note: C++ does not support default-int
c:\motion-twin\haxe\lib\hxcpp\2,08,0\include\Array.h(387) : error C2143: syntax
error : missing ',' before '&'
c:\motion-twin\haxe\lib\hxcpp\2,08,0\include\Array.h(387) : error C4430: missing
 type specifier - int assumed. Note: C++ does not support default-int
c:\motion-twin\haxe\lib\hxcpp\2,08,0\include\Array.h(387) : warning C4183: '__so
rt': missing return type; assumed to be a member function returning 'int'
c:\motion-twin\haxe\lib\hxcpp\2,08,0\include\Array.h(388) : error C2146: syntax
error : missing ';' before identifier '__toString'
c:\motion-twin\haxe\lib\hxcpp\2,08,0\include\Array.h(388) : error C2433: 'Array_
obj<ELEM_>::Dynamic' : 'virtual' not permitted on data declarations
        with
        [
            ELEM_=String
        ]
c:\motion-twin\haxe\lib\hxcpp\2,08,0\include\Array.h(388) : error C4430: missing
 type specifier - int assumed. Note: C++ does not support default-int
c:\motion-twin\haxe\lib\hxcpp\2,08,0\include\Array.h(388) : error C4430: missing
 type specifier - int assumed. Note: C++ does not support default-int
c:\motion-twin\haxe\lib\hxcpp\2,08,0\include\Array.h(388) : warning C4183: '__to
String': missing return type; assumed to be a member function returning 'int'
c:\motion-twin\haxe\lib\hxcpp\2,08,0\include\Array.h(389) : error C2146: syntax
error : missing ';' before identifier '__unshift'
c:\motion-twin\haxe\lib\hxcpp\2,08,0\include\Array.h(389) : error C2433: 'Array_
obj<ELEM_>::Dynamic' : 'virtual' not permitted on data declarations
        with
        [
            ELEM_=String
        ]
c:\motion-twin\haxe\lib\hxcpp\2,08,0\include\Array.h(389) : error C4430: missing
 type specifier - int assumed. Note: C++ does not support default-int
c:\motion-twin\haxe\lib\hxcpp\2,08,0\include\Array.h(389) : error C4430: missing
 type specifier - int assumed. Note: C++ does not support default-int
c:\motion-twin\haxe\lib\hxcpp\2,08,0\include\Array.h(389) : error C2143: syntax
error : missing ',' before '&'
c:\motion-twin\haxe\lib\hxcpp\2,08,0\include\Array.h(389) : error C4430: missing
 type specifier - int assumed. Note: C++ does not support default-int
c:\motion-twin\haxe\lib\hxcpp\2,08,0\include\Array.h(389) : warning C4183: '__un
shift': missing return type; assumed to be a member function returning 'int'
c:\motion-twin\haxe\lib\hxcpp\2,08,0\include\Array.h(390) : error C2555: 'Array_
obj<ELEM_>::__GetItem': overriding virtual function return type differs and is n
ot covariant from 'hx::Object::__GetItem'
        with
        [
            ELEM_=String
        ]
        C:\Motion-Twin\haxe\lib\hxcpp\2,08,0\include\hx/Object.h(98) : see decla
ration of 'hx::Object::__GetItem'
c:\motion-twin\haxe\lib\hxcpp\2,08,0\include\Array.h(390) : error C2555: 'Array_
obj<ELEM_>::__copy': overriding virtual function return type differs and is not
covariant from 'hx::ArrayBase::__copy'
        with
        [
            ELEM_=String
        ]
        c:\motion-twin\haxe\lib\hxcpp\2,08,0\include\Array.h(90) : see declarati
on of 'hx::ArrayBase::__copy'
c:\motion-twin\haxe\lib\hxcpp\2,08,0\include\Array.h(390) : error C2555: 'Array_
obj<ELEM_>::__iterator': overriding virtual function return type differs and is
not covariant from 'hx::ArrayBase::__iterator'
        with
        [
            ELEM_=String
        ]
        c:\motion-twin\haxe\lib\hxcpp\2,08,0\include\Array.h(92) : see declarati
on of 'hx::ArrayBase::__iterator'
c:\motion-twin\haxe\lib\hxcpp\2,08,0\include\Array.h(390) : error C2555: 'Array_
obj<ELEM_>::__pop': overriding virtual function return type differs and is not c
ovariant from 'hx::ArrayBase::__pop'
        with
        [
            ELEM_=String
        ]
        c:\motion-twin\haxe\lib\hxcpp\2,08,0\include\Array.h(94) : see declarati
on of 'hx::ArrayBase::__pop'
c:\motion-twin\haxe\lib\hxcpp\2,08,0\include\Array.h(390) : error C2555: 'Array_
obj<ELEM_>::__reverse': overriding virtual function return type differs and is n
ot covariant from 'hx::ArrayBase::__reverse'
        with
        [
            ELEM_=String
        ]
        c:\motion-twin\haxe\lib\hxcpp\2,08,0\include\Array.h(97) : see declarati
on of 'hx::ArrayBase::__reverse'
c:\motion-twin\haxe\lib\hxcpp\2,08,0\include\Array.h(390) : error C2555: 'Array_
obj<ELEM_>::__shift': overriding virtual function return type differs and is not
 covariant from 'hx::ArrayBase::__shift'
        with
        [
            ELEM_=String
        ]
        c:\motion-twin\haxe\lib\hxcpp\2,08,0\include\Array.h(98) : see declarati
on of 'hx::ArrayBase::__shift'
c:\motion-twin\haxe\lib\hxcpp\2,08,0\include\Array.h(390) : error C2555: 'Array_
obj<ELEM_>::__toString': overriding virtual function return type differs and is
not covariant from 'hx::ArrayBase::__toString'
        with
        [
            ELEM_=String
        ]
        c:\motion-twin\haxe\lib\hxcpp\2,08,0\include\Array.h(102) : see declarat
ion of 'hx::ArrayBase::__toString'
./src/com/fireworks/utils/Clock.cpp(203) : error C2466: cannot allocate an array
 of constant size 0
./src/com/fireworks/utils/Clock.cpp(203) : error C3861: 'null': identifier not f
ound
./src/com/fireworks/utils/Clock.cpp(216) : error C3861: 'null': identifier not f
ound

Loading...