DeSerialize error with NDK

shoe[box]
edited April 2013 in Native
Hi Guys.

I've been using the win32 sdk and all is working fine.

But when i try to compile for android ( by using the cloud NDK sdk ) i have the following error about the serializer class :

[code2=java]arm-linux-androideabi-g++ -o../ndll/Android/libHypPhoton.so -frtti -nostdlib -Wl,-shared,-Bsymbolic -Wl,--no-undefined -Wl,-z,noexecstack --sysroot=C:\Developement\Android\NDK/platforms/android-5/arch-arm -LC:\Developement\Android\NDK/platforms/android-5/arch-arm/usr/lib @all_objs ../libs/android/release/libcommon-cpp-static_release_android_armeabi.a ../libs/android/release/libloadbalancing-cpp-prebuilt-static_release_android_armeabi.a ../libs/android/release/libphoton-cpp-static_release_android_armeabi.a C:\Developement\Android\NDK/sources/cxx-stl/gnu-libstdc++/4.4.3/libs/armeabi/libgnustl_static.a C:\Developement\Android\NDK/platforms/android-5/arch-arm/usr/lib/crtbegin_so.o C:\Developement\Android\NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/lib/gcc/arm-linux-androideabi/4.4.3/libgcc.a C:\Developement\Android\NDK/platforms/android-5/arch-arm/usr/lib/libc.so C:\Developement\Android\NDK/platforms/android-5/arch-arm/usr/lib/libm.so -llog -ldl
../libs/android/release/libphoton-cpp-static_release_android_armeabi.a(PeerBase.o): In function `ExitGames::Photon::Internal::PeerBase::deserializeEvent(unsigned char*, bool, int)':
PeerBase.cpp:(.text+0xa30): undefined reference to `ExitGames::Common::DeSerializer::DeSerializer(unsigned char const*)'
PeerBase.cpp:(.text+0xa38): undefined reference to `ExitGames::Common::DeSerializer::readByte()'
PeerBase.cpp:(.text+0xa44): undefined reference to `ExitGames::Common::DeSerializer::readShort()'
PeerBase.cpp:(.text+0xac8): undefined reference to `ExitGames::Common::DeSerializer::popType(unsigned char, ExitGames::Common::Object&)'
PeerBase.cpp:(.text+0xad4): undefined reference to `ExitGames::Common::DeSerializer::pop(ExitGames::Common::Object&)'
../libs/android/release/libphoton-cpp-static_release_android_armeabi.a(PeerBase.o): In function `ExitGames::Photon::Internal::PeerBase::deserializeOperationResponse(unsigned char*, bool, int, unsigned char)':
[...][/code2]

Does anyone have an idea how to to solve this ?

Thanks a lot

shoe[box] //

Comments

  • Hi shoe[box].

    Which version of the Client SDK are you using?
    Can you reproduce this issue with the demo from the SDK (if not, then please provide us with a minimal reproduction case)?
  • I'm using the "Photon-AndroidNDK_v3-2-1-1_Cloud_SDK".

    The goal is to build a native extension for Haxe NME.

    You can find the source here on github : https://github.com/hyperfiction/HypPhoton/tree/master/project

    The "main" photon class here : https://github.com/hyperfiction/HypPhoton/blob/master/project/common/HypPhoton.cpp

    Thanks.
  • If i compile my extension by using the debug ".a" and not the release files it works.

    Strange :shock:
  • Phew. A guide how to build your project on windows as a total haxe newbie would help.

    I have installed haxe and hxcpp, renamed the build.sh into build.bat and added the HXCPP_MSVC environment variable, so that haxe is using the correct MSVC version, but now I am getting the following errors:

    [code2=batch]E:\dev\lokales\HypPhoton-master\project>rm -rf obj

    E:\dev\lokales\HypPhoton-master\project>rm -rf vc100.pdb

    E:\dev\lokales\HypPhoton-master\project>rm -rf ../ndll/Windows

    E:\dev\lokales\HypPhoton-master\project>rm -rf all_objs

    E:\dev\lokales\HypPhoton-master\project>haxelib run hxcpp Build.xml -Dwindows
    Setting environment for using Microsoft Visual Studio 2010 x86 tools.
    cl.exe -Iinclude -Iwindows/include -Iwindows/photon-common -Iwindows/photon-core
    -Iwindows/photon-loadbalancing -nologo -O2 -DHX_WINDOWS -GR -Zi -Oy- -c -EHs -I
    C:\Motion-Twin\Haxe\lib\hxcpp\3,0,0//include -DHXCPP_VISIT_ALLOCS -D_CRT_SECURE_
    NO_DEPRECATE -wd4996 -MT ./common/ExternalInterface.cpp -Foobj/mscv16/common/Ext
    ernalInterface.obj
    cl.exe -Iinclude -Iwindows/include -Iwindows/photon-common -Iwindows/photon-core
    -Iwindows/photon-loadbalancing -nologo -O2 -DHX_WINDOWS -GR -Zi -Oy- -c -EHs -I
    C:\Motion-Twin\Haxe\lib\hxcpp\3,0,0//include -DHXCPP_VISIT_ALLOCS -D_CRT_SECURE_
    NO_DEPRECATE -wd4996 -MT ./common/HypPhoton.cpp -Foobj/mscv16/common/HypPhoton.o
    bj
    HypPhoton.cpp
    ExternalInterface.cpp
    E:\dev\lokales\HypPhoton-master\project\windows\photon-common\porting.h(15) : wa
    rning C4005: '_WIN32_WINNT' : macro redefinition
    C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\sdkddkver.h(
    197) : see previous definition of '_WIN32_WINNT'
    e:\dev\lokales\hypphoton-master\project\windows\photon-core\internal\PhotonConne
    ct.h(76) : warning C4005: 'EWOULDBLOCK' : macro redefinition
    C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(1
    32) : see previous definition of 'EWOULDBLOCK'
    e:\dev\lokales\hypphoton-master\project\windows\photon-core\internal\PhotonConne
    ct.h(77) : warning C4005: 'EINPROGRESS' : macro redefinition
    C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(1
    04) : see previous definition of 'EINPROGRESS'
    e:\dev\lokales\hypphoton-master\project\windows\photon-core\internal\PhotonConne
    ct.h(78) : warning C4005: 'ENETDOWN' : macro redefinition
    C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(1
    08) : see previous definition of 'ENETDOWN'
    e:\dev\lokales\hypphoton-master\project\windows\photon-core\internal\PhotonConne
    ct.h(79) : warning C4005: 'ENETUNREACH' : macro redefinition
    C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(1
    10) : see previous definition of 'ENETUNREACH'
    e:\dev\lokales\hypphoton-master\project\windows\photon-core\internal\PhotonConne
    ct.h(80) : warning C4005: 'EMSGSIZE' : macro redefinition
    C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(1
    07) : see previous definition of 'EMSGSIZE'
    e:\dev\lokales\hypphoton-master\project\windows\photon-core\internal\PhotonConne
    ct.h(81) : warning C4005: 'ENOTCONN' : macro redefinition
    C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(1
    18) : see previous definition of 'ENOTCONN'
    e:\dev\lokales\hypphoton-master\project\windows\photon-core\internal\PhotonConne
    ct.h(82) : warning C4005: 'ECONNREFUSED' : macro redefinition
    C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(9
    9) : see previous definition of 'ECONNREFUSED'
    ./common/HypPhoton.cpp(98) : warning C4355: 'this' : used in base member initial
    izer list
    e:\dev\lokales\hypphoton-master\project\windows\photon-core\internal\PhotonConne
    ct.h(76) : warning C4005: 'EWOULDBLOCK' : macro redefinition
    C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(1
    32) : see previous definition of 'EWOULDBLOCK'
    e:\dev\lokales\hypphoton-master\project\windows\photon-core\internal\PhotonConne
    ct.h(77) : warning C4005: 'EINPROGRESS' : macro redefinition
    C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(1
    04) : see previous definition of 'EINPROGRESS'
    e:\dev\lokales\hypphoton-master\project\windows\photon-core\internal\PhotonConne
    ct.h(78) : warning C4005: 'ENETDOWN' : macro redefinition
    C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(1
    08) : see previous definition of 'ENETDOWN'
    e:\dev\lokales\hypphoton-master\project\windows\photon-core\internal\PhotonConne
    ct.h(79) : warning C4005: 'ENETUNREACH' : macro redefinition
    C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(1
    10) : see previous definition of 'ENETUNREACH'
    e:\dev\lokales\hypphoton-master\project\windows\photon-core\internal\PhotonConne
    ct.h(80) : warning C4005: 'EMSGSIZE' : macro redefinition
    C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(1
    07) : see previous definition of 'EMSGSIZE'
    e:\dev\lokales\hypphoton-master\project\windows\photon-core\internal\PhotonConne
    ct.h(81) : warning C4005: 'ENOTCONN' : macro redefinition
    C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(1
    18) : see previous definition of 'ENOTCONN'
    e:\dev\lokales\hypphoton-master\project\windows\photon-core\internal\PhotonConne
    ct.h(82) : warning C4005: 'ECONNREFUSED' : macro redefinition
    C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(9
    9) : see previous definition of 'ECONNREFUSED'
    link.exe -out:obj/lib/HypPhoton.ndll -nologo -machine:x86 -dll -libpath:lib @all
    _objs ../libs/windows/release/Common-cpp_release_win32.lib ../libs/windows/relea
    se/Photon-cpp_release_win32.lib ../libs/windows/release/LoadBalancing-cpp_releas
    e_win32.lib
    Creating library obj/lib/HypPhoton.lib and object obj/lib/HypPhoton.exp
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al class hx::FieldRef __thiscall hx::Object::__FieldRef(class String const &)" (
    ?__FieldRef@Object@hx@@Z);
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al class String __thiscall hx::Object::__ToString(void)const " (?__ToString@Obje
    ct@hx@@UBE?AVString@@XZ);
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al char const * __thiscall hx::Object::__CStr(void)const " (?__CStr@Object@hx@@U
    BEPBDXZ)
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al class String __thiscall hx::Object::toString(void)" (?toString@Object@hx@@UAE
    ?AVString@@XZ);
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al bool __thiscall hx::Object::__HasField(class String const &)" (?__HasField@Ob
    ject@hx@@Z);
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al class Dynamic __thiscall hx::Object::__Field(class String const &,bool)" (?__
    Field@Object@hx@@UAE?AVDynamic@@ABVString@@_N@Z);
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al class Dynamic __thiscall hx::Object::__IField(int)" (?__IField@Object@hx@@UAE
    ?AVDynamic@@H@Z);
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al double __thiscall hx::Object::__INumField(int)" (?__INumField@Object@hx@@UAEN
    H@Z)
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al class Dynamic __thiscall hx::Object::__SetField(class String const &,class Dy
    namic const &,bool)" (?__SetField@Object@hx@@UAE?AVDynamic@@ABVString@@ABV3@_N@Z
    )
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu

    @Z);
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al class Dynamic __thiscall hx::Object::__Run(class Array<class Dynamic> const &
    )" (?__Run@Object@hx@@UAE?AVDynamic@@Z);
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al class hx::FieldMap * __thiscall hx::Object::__GetFieldMap(void)" (?__GetField
    Map@Object@hx@@UAEPAVFieldMap@2@XZ);
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al void __thiscall hx::Object::__GetFields(class Array<class String> &)" (?__Get
    Fields@Object@hx@@Z);
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al class hx::ObjectPtr<class Class_obj> __thiscall hx::Object::__GetClass(void)c
    onst " (?__GetClass@Object@hx@@2@XZ);
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al int __thiscall hx::Object::__Compare(class hx::Object const *)const " (?__Com
    pare@Object@hx@@UBEHPBV12@@Z);
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al class Array<class Dynamic> __thiscall hx::Object::__EnumParams(void)" (?__Enu
    mParams@Object@hx@@XZ);
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al class String __thiscall hx::Object::__Tag(void)const " (?__Tag@Object@hx@@UBE
    ?AVString@@XZ);
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al int __thiscall hx::Object::__Index(void)const " (?__Index@Object@hx@@UBEHXZ);
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al class Dynamic __thiscall hx::Object::__GetItem(int)const " (?__GetItem@Object
    @hx@@UBE?AVDynamic@@H@Z);
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al class Dynamic __thiscall hx::Object::__SetItem(int,class Dynamic)" (?__SetIte
    m@Object@hx@@UAE?AVDynamic@@HV3@@Z);
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al class Dynamic __thiscall hx::Object::__run(class Dynamic const &,class Dynami
    c const &,class Dynamic const &,class Dynamic const &,class Dynamic const &)" (?
    __run@Object@hx@@UAE?AVDynamic@@ABV3@0000@Z);
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al class Dynamic __thiscall hx::Object::__run(class Dynamic const &,class Dynami
    c const &,class Dynamic const &,class Dynamic const &)" (?__run@Object@hx@@UAE?A
    VDynamic@@ABV3@000@Z);
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al class Dynamic __thiscall hx::Object::__run(class Dynamic const &,class Dynami
    c const &,class Dynamic const &)" (?__run@Object@hx@@UAE?AVDynamic@@ABV3@00@Z);
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al class Dynamic __thiscall hx::Object::__run(class Dynamic const &,class Dynami
    c const &)" (?__run@Object@hx@@UAE?AVDynamic@@ABV3@0@Z);
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al class Dynamic __thiscall hx::Object::__run(class Dynamic const &)" (?__run@Ob
    ject@hx@@UAE?AVDynamic@@ABV3@@Z);
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al class Dynamic __thiscall hx::Object::__run(void)" (?__run@Object@hx@@UAE?AVDy
    namic@@XZ);
    ExternalInterface.obj : error LNK2019: unresolved external symbol "public: class
    String __thiscall String::operator+(class String)const " (??HString@@QBE?AV0@V0
    @Z); referenced in function "public: class String __thiscall String::operator+(i
    nt const &)const " (??HString@@QBE?AV0@ABH@Z)
    ExternalInterface.obj : error LNK2019: unresolved external symbol "public: __thi
    scall String::String(int const &)" (??0String@@QAE@ABH@Z); referenced in function
    "public: class String __thiscall String::operator+(int const &)const " (??HStri
    ng@@QBE?AV0@ABH@Z)
    ExternalInterface.obj : error LNK2019: unresolved external symbol "public: __thi
    scall String::String(bool const &)" (??0String@@QAE@AB_N@Z); referenced in functi
    on "public: class String __thiscall String::operator+(bool const &)const " (??HS
    tring@@QBE?AV0@AB_N@Z)
    ExternalInterface.obj : error LNK2019: unresolved external symbol "public: __thi
    scall String::String(double const &)" (??0String@@QAE@ABN@Z); referenced in funct
    ion "public: class String __thiscall String::operator+(double const &)const " (?
    ?HString@@QBE?AV0@ABN@Z)
    ExternalInterface.obj : error LNK2019: unresolved external symbol "public: __thi
    scall String::String(float const &)" (??0String@@QAE@ABM@Z); referenced in functi
    on "public: class String __thiscall String::operator+(float const &)const " (??H
    String@@QBE?AV0@ABM@Z)
    ExternalInterface.obj : error LNK2019: unresolved external symbol "public: __thi
    scall String::String(class cpp::CppInt32__ const &)" (??0String@@QAE@ABVCppInt32
    @Z); referenced in function "public: class String __thiscall String::oper
    ator+(class cpp::CppInt32__ const &)const " (??HString@@QBE?AV0@ABVCppInt32__@cp
    @Z);
    ExternalInterface.obj : error LNK2019: unresolved external symbol "public: __thi
    scall String::String(class Dynamic const &)" (??0String@@Z); ref
    erenced in function "public: bool __thiscall Dynamic::operator!=(class String co
    nst &)const " (??9Dynamic@@Z);
    ExternalInterface.obj : error LNK2019: unresolved external symbol "public: stati
    c void __cdecl Dynamic::ThrowBadFunctionError(void)" (?ThrowBadFunctionError@Dyn
    amic@@SAXXZ); referenced in function "public: void __thiscall Dynamic::CheckFPtr(
    void)" (?CheckFPtr@Dynamic@@QAEXXZ);
    ExternalInterface.obj : error LNK2019: unresolved external symbol "void __cdecl
    hx::MarkObjectAlloc(class hx::Object *,class hx::MarkContext *)" (?MarkObjectAll
    oc@hx@@YAXPAVObject@1@PAVMarkContext@1@@Z); referenced in function "void __cdecl
    hx::MarkMember<class Dynamic>(class Dynamic &,class hx::MarkContext *)" (??$Mark
    @hx@@YAXAAVDynamic@@PAVMarkContext@0@@Z);
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: stati
    c class hx::ObjectPtr<class Class_obj> hx::Anon_obj::__mClass" (?__mClass@Anon_o
    bj@hx@@2@A);
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al void __thiscall hx::Anon_obj::__Mark(class hx::MarkContext *)" (?__Mark@Anon_
    obj@hx@@UAEXPAVMarkContext@2@@Z);
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al void __thiscall hx::Anon_obj::__Visit(class hx::VisitContext *)" (?__Visit@An
    on_obj@hx@@UAEXPAVVisitContext@2@@Z);
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al class String __thiscall hx::Anon_obj::__ToString(void)const " (?__ToString@An
    on_obj@hx@@UBE?AVString@@XZ);
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al class String __thiscall hx::Anon_obj::toString(void)" (?toString@Anon_obj@hx@
    @UAE?AVString@@XZ);
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al bool __thiscall hx::Anon_obj::__HasField(class String const &)" (?__HasField@
    Anon_obj@hx@@Z);
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al class Dynamic __thiscall hx::Anon_obj::__Field(class String const &,bool)" (?
    __Field@Anon_obj@hx@@UAE?AVDynamic@@ABVString@@_N@Z);
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al class Dynamic __thiscall hx::Anon_obj::__SetField(class String const &,class
    Dynamic const &,bool)" (?__SetField@Anon_obj@hx@@UAE?AVDynamic@@ABVString@@ABV3@
    _N@Z)
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al void __thiscall hx::Anon_obj::__GetFields(class Array<class String> &)" (?__G
    etFields@Anon_obj@hx@@Z);
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al class Dynamic __thiscall cpp::IteratorBase::__Field(class String const &,bool
    )" (?__Field@IteratorBase@cpp@@UAE?AVDynamic@@ABVString@@_N@Z);
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: stati
    c class hx::ObjectPtr<class Class_obj> hx::ArrayBase::__mClass" (?__mClass@Array
    Base@hx@@2@A);
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al class String __thiscall hx::ArrayBase::__ToString(void)const " (?__ToString@A
    rrayBase@hx@@UBE?AVString@@XZ);
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al class String __thiscall hx::ArrayBase::toString(void)" (?toString@ArrayBase@h
    x@@UAE?AVString@@XZ);
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al class Dynamic __thiscall hx::ArrayBase::__Field(class String const &,bool)" (
    ?__Field@ArrayBase@hx@@UAE?AVDynamic@@ABVString@@_N@Z);
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al void __thiscall hx::ArrayBase::__SetSize(int)" (?__SetSize@ArrayBase@hx@@UAEX
    H@Z)
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al void __thiscall hx::Interface::__Mark(class hx::MarkContext *)" (?__Mark@Inte
    rface@hx@@UAEXPAVMarkContext@2@@Z);
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al class hx::Object * __thiscall hx::Interface::__ToInterface(class type_info co
    nst &)" (?__ToInterface@Interface@hx@@Z);
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al int __thiscall hx::Interface::__GetType(void)const " (?__GetType@Interface@hx
    @UBEHXZ);
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al void * __thiscall hx::Interface::__GetHandle(void)const " (?__GetHandle@Inter
    face@hx@@UBEPAXXZ);
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al class hx::FieldRef __thiscall hx::Interface::__FieldRef(class String const &)
    " (?__FieldRef@Interface@hx@@Z);
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al class String __thiscall hx::Interface::__ToString(void)const " (?__ToString@I
    nterface@hx@@UBE?AVString@@XZ);
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al int __thiscall hx::Interface::__ToInt(void)const " (?__ToInt@Interface@hx@@UB
    EHXZ)
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al double __thiscall hx::Interface::__ToDouble(void)const " (?__ToDouble@Interfa
    ce@hx@@UBENXZ);
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al char const * __thiscall hx::Interface::__CStr(void)const " (?__CStr@Interface
    @hx@@UBEPBDXZ);
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al class String __thiscall hx::Interface::toString(void)" (?toString@Interface@h
    x@@UAE?AVString@@XZ);
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al bool __thiscall hx::Interface::__HasField(class String const &)" (?__HasField
    @Interface@hx@@Z);
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al class Dynamic __thiscall hx::Interface::__Field(class String const &,bool)" (
    ?__Field@Interface@hx@@UAE?AVDynamic@@ABVString@@_N@Z);
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al class Dynamic __thiscall hx::Interface::__IField(int)" (?__IField@Interface@h
    x@@UAE?AVDynamic@@H@Z);
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al class Dynamic __thiscall hx::Interface::__SetField(class String const &,class
    Dynamic const &,bool)" (?__SetField@Interface@hx@@UAE?AVDynamic@@ABVString@@ABV
    3@_N@Z)
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al void __thiscall hx::Interface::__SetThis(class Dynamic)" (?__SetThis@Interfac
    e@hx@@Z);
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al void __thiscall hx::Interface::__GetFields(class Array<class String> &)" (?__
    GetFields@Interface@hx@@Z);
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al class hx::ObjectPtr<class Class_obj> __thiscall hx::Interface::__GetClass(voi
    d)const " (?__GetClass@Interface@hx@@2@XZ);
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al int __thiscall hx::Interface::__Compare(class hx::Object const *)const " (?__
    Compare@Interface@hx@@UBEHPBVObject@2@@Z);
    ExternalInterface.obj : error LNK2019: unresolved external symbol "public: stati
    c class hx::ObjectPtr<class Class_obj> & __cdecl hx::Object::__SGetClass(void)"
    (?__SGetClass@Object@hx@@2@XZ); referenced in funct
    ion "public: static class hx::ObjectPtr<class Class_obj> & __cdecl hx::ObjectPtr
    @hx
    @2@XZ);
    ExternalInterface.obj : error LNK2019: unresolved external symbol "public: __thi
    scall Dynamic::Dynamic(int)" (??0Dynamic@@QAE@H@Z); referenced in function "publi
    c: virtual class Dynamic __thiscall cpp::FastIterator_obj<unsigned char>::_dynam
    icNext(void)" (?_dynamicNext@?$FastIterator_obj@E@cpp@@UAE?AVDynamic@@XZ);
    ExternalInterface.obj : error LNK2019: unresolved external symbol "public: __thi
    scall hx::Anon_obj::Anon_obj(void)" (??0Anon_obj@hx@@QAE@XZ); referenced in funct
    ion "public: static class hx::ObjectPtr<class hx::Anon_obj> __cdecl hx::Anon_obj
    ::Create(void)" (?Create@Anon_obj@hx@@2@XZ);
    ExternalInterface.obj : error LNK2019: unresolved external symbol "public: stati
    c void * __cdecl hx::Object::operator new(unsigned int,bool)" (??2Object@hx@@SAP
    AXI_N@Z) referenced in function "public: static class hx::ObjectPtr<class hx::An
    on_obj> __cdecl hx::Anon_obj::Create(void)" (?Create@Anon_obj@hx@@SA?AV?$ObjectP
    @2@XZ);
    ExternalInterface.obj : error LNK2019: unresolved external symbol "void * __cdec
    l hx::NewGCBytes(void *,int)" (?NewGCBytes@hx@@YAPAXPAXH@Z); referenced in functi
    on "class Dynamic * __cdecl hx::NewNull<class Dynamic>(void)" (??$NewNull@VDynam
    @hx@@YAPAVDynamic@@XZ);
    ExternalInterface.obj : error LNK2019: unresolved external symbol "public: __thi
    scall Dynamic::Dynamic(double)" (??0Dynamic@@QAE@N@Z); referenced in function "pu
    blic: double __thiscall Dynamic::operator++(void)" (??EDynamic@@QAENXZ);
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al void __thiscall Class_obj::__Mark(class hx::MarkContext *)" (?__Mark@Class_ob
    j@@Z);
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al void __thiscall Class_obj::__Visit(class hx::VisitContext *)" (?__Visit@Class
    _obj@@Z);
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al class String __thiscall Class_obj::__ToString(void)const " (?__ToString@Class
    _obj@@UBE?AVString@@XZ);
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al bool __thiscall Class_obj::__HasField(class String const &)" (?__HasField@Cla
    ss_obj@@Z);
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al class Dynamic __thiscall Class_obj::__Field(class String const &,bool)" (?__F
    ield@Class_obj@@UAE?AVDynamic@@ABVString@@_N@Z);
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al class Dynamic __thiscall Class_obj::__SetField(class String const &,class Dyn
    amic const &,bool)" (?__SetField@Class_obj@@UAE?AVDynamic@@ABVString@@ABV2@_N@Z);

    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al class hx::ObjectPtr<class Class_obj> __thiscall Class_obj::__GetClass(void)co
    nst " (?__GetClass@Class_obj@@hx@@XZ);
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al void __thiscall hx::EnumBase_obj::__Mark(class hx::MarkContext *)" (?__Mark@E
    numBase_obj@hx@@UAEXPAVMarkContext@2@@Z);
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al void __thiscall hx::EnumBase_obj::__Visit(class hx::VisitContext *)" (?__Visi
    t@EnumBase_obj@hx@@UAEXPAVVisitContext@2@@Z);
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al class String __thiscall hx::EnumBase_obj::toString(void)" (?toString@EnumBase
    _obj@hx@@UAE?AVString@@XZ);
    ExternalInterface.obj : error LNK2001: unresolved external symbol "public: virtu
    al class Dynamic __thiscall hx::EnumBase_obj::__Field(class String const &,bool)
    " (?__Field@EnumBase_obj@hx@@UAE?AVDynamic@@ABVString@@_N@Z);
    ExternalInterface.obj : error LNK2019: unresolved external symbol "public: void
    __thiscall hx::ArrayBase::EnsureSize(int)const " (?EnsureSize@ArrayBase@hx@@QBEX
    H@Z) referenced in function "public: class Dynamic & __thiscall Array_obj<class
    @QAEAAVDynamic@@H@Z);
    obj/lib/HypPhoton.ndll : fatal error LNK1120: 86 unresolved externals
    Called from ? line 1
    Called from BuildTool.hx line 1470
    Called from BuildTool.hx line 673
    Called from BuildTool.hx line 708
    Called from BuildTool.hx line 842
    Called from BuildTool.hx line 939
    Called from BuildTool.hx line 336
    Uncaught exception - Error : 1120 - build cancelled

    E:\dev\lokales\HypPhoton-master\project>cp ../ndll/Windows/HypPhoton.ndll ../bin
    -debug/windows/cpp/bin/HypPhoton.ndll
    cp: cannot stat `../ndll/Windows/HypPhoton.ndll': No such file or directory

    E:\dev\lokales\HypPhoton-master\project>pause
    Press any key to continue . . .[/code2]

    Edit: That has been the Windows build. The Android build seems to work just fine for me.
  • Thanks a lot for your help ;)

    Haxe you installed hxcpp & haxe manually ?
    All you have to do is install NME by using the installer provided here:http://www.nme.io/download.

    For the linker errors you have i've never seen that, i think there is something missing in your install ( perhaps a reboot is needed for a PATH... don't know )

    For android it's working fine only if i use the debug ".a".
    But in release mode it still doesn't work.
    You can test easily by yourself by removing the following lines inside the Build.xml file:

    [code2=xml]<lib if="android" name="../libs/android/debug/libcommon-cpp-static_debug_android_armeabi.a"/>
    <lib if="android" name="../libs/android/debug/libphoton-cpp-static_debug_android_armeabi.a"/>
    <lib if="android" name="../libs/android/debug/libloadbalancing-cpp-prebuilt-static_debug_android_armeabi.a"/>[/code2]

    Thanks again for your help.
  • Yes, I have installed them manually. Thanks for the hint to install nme instead.

    I have not installed it yet, but I can already reproduce your issue now by outcommenting those 3 lines.

    After searching the internet "for nme android release undefined reference" (without "") I found http://www.nme.io/community/forums/inst ... ws7-64bit/

    Therefor I opened C:\Motion-Twin\Haxe\lib\hxcpp\3,0,0\build-tool\android-toolchain.xml in a text-editor and added the following line:
    <lib name="E:\dev\lokales\HypPhoton-master\libs\android\release\libcommon-cpp-static_release_android_armeabi.a"/>

    Afterwards the errors when linking against the release libs have been gone. Looks like Haxe somehow can't find the lib due to some path lookup issues either in Haxe itself or in your project.
    The funny thing is, that I had to only add the Common lib and didn't need to add the Photon or the LoadBalancing lib, but that's maybe just because they all can be found in the same path.
  • Hi.

    Strange the linker usually works well for all the others native extensions than i've developped.
    It's not super "user-friendly" to have to modify your android_toolchain.xml, normally with a native extension all you have to do is to link it to your project and that's all.

    Anyways i will for now use the "debug" files and i will send a feedback to nme about it, to see if they have a idea.

    I have it embed into my game and all seems to work fine.

    Next : iOS & flash.

    Thanks :)

    shoe[box]
  • Yeah I also wouldn't call that user-friendly and its far from being an ideal long-term solution to ask your users to modify files in their hxcpp installation, but it outlines pretty clearly, that its likely to be an issue with path lookup, so it should help someone more into nme than me to find a better fix.

    Contacting the nme developers seems to be a good idea to me, too, but the haxe creators could also be of help here, as I have not had to install nme itself at all to reproduce the issue and to find out that it modifying the toolchain helps.

    Good luck with iOS and flash.