iOS and Android builds fail, dgVector has no member 'm_ix'

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

iOS and Android builds fail, dgVector has no member 'm_ix'

Postby pHySiQuE » Sun Nov 10, 2013 3:13 am

This is the error message I get. It was working fine a month ago:
C:/Leadwerks/Engine/Projects/Android/jni/../../../Source/Libraries/NewtonDynamics/coreLibrary_300/source/physics/dgCollisionHeightField.cpp: In member function 'void dgCollisionHeightField::GetLocalAABB(const dgVector&, const dgVector&, dgVector&, dgVector&) const':
C:/Leadwerks/Engine/Projects/Android/jni/../../../Source/Libraries/NewtonDynamics/coreLibrary_300/source/physics/dgCollisionHeightField.cpp:787: error: 'class dgVector' has no member named 'm_ix'
C:/Leadwerks/Engine/Projects/Android/jni/../../../Source/Libraries/NewtonDynamics/coreLibrary_300/source/physics/dgCollisionHeightField.cpp:788: error: 'class dgVector' has no member named 'm_ix'
C:/Leadwerks/Engine/Projects/Android/jni/../../../Source/Libraries/NewtonDynamics/coreLibrary_300/source/physics/dgCollisionHeightField.cpp:789: error: 'class dgVector' has no member named 'm_iz'
C:/Leadwerks/Engine/Projects/Android/jni/../../../Source/Libraries/NewtonDynamics/coreLibrary_300/source/physics/dgCollisionHeightField.cpp:790: error: 'class dgVector' has no member named 'm_iz'
C:/Leadwerks/Engine/Projects/Android/jni/../../../Source/Libraries/NewtonDynamics/coreLibrary_300/source/physics/dgCollisionHeightField.cpp: In member function 'virtual void dgCollisionHeightField::GetCollidingFaces(dgPolygonMeshDesc*) const':
C:/Leadwerks/Engine/Projects/Android/jni/../../../Source/Libraries/NewtonDynamics/coreLibrary_300/source/physics/dgCollisionHeightField.cpp:857: error: 'class dgVector' has no member named 'm_ix'
C:/Leadwerks/Engine/Projects/Android/jni/../../../Source/Libraries/NewtonDynamics/coreLibrary_300/source/physics/dgCollisionHeightField.cpp:858: error: 'class dgVector' has no member named 'm_ix'
C:/Leadwerks/Engine/Projects/Android/jni/../../../Source/Libraries/NewtonDynamics/coreLibrary_300/source/physics/dgCollisionHeightField.cpp:859: error: 'class dgVector' has no member named 'm_iz'
C:/Leadwerks/Engine/Projects/Android/jni/../../../Source/Libraries/NewtonDynamics/coreLibrary_300/source/physics/dgCollisionHeightField.cpp:860: error: 'class dgVector' has no member named 'm_iz'
make: *** [C:/Leadwerks/Engine/Projects/Android/obj/local/armeabi/objs/newtondynamics/__/__/__/Source/Libraries/NewtonDynamics/coreLibrary_300/source/physics/dgCollisionHeightField.o] Error 1
Last edited by pHySiQuE on Sun Nov 10, 2013 5:48 am, edited 1 time in total.
pHySiQuE
 
Posts: 608
Joined: Fri Sep 02, 2011 9:54 pm

Re: Failing to build on Android, for some reason

Postby pHySiQuE » Sun Nov 10, 2013 5:22 am

Same thing happens when building it for the iOS simulator (x86). LLVM suggests I change the member to m_x, m_y, etc.
pHySiQuE
 
Posts: 608
Joined: Fri Sep 02, 2011 9:54 pm

Re: iOS and Android builds fail, dgVector has no member 'm_i

Postby Julio Jerez » Sun Nov 10, 2013 6:52 am

That's because you have to define DG_SCALAR_VECTOR_CLASS for non intel cpu
there are not simd vetoc math for ARM cpu. you need to use the default scalar arithmetic class.


just add DG_SCALAR_VECTOR_CLASS to the compiler command line.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: iOS and Android builds fail, dgVector has no member 'm_i

Postby pHySiQuE » Sun Nov 10, 2013 1:21 pm

This should be automatic when dgtypes.h is included. Even if I define that macro in the makefile, it still doesn't work.
pHySiQuE
 
Posts: 608
Joined: Fri Sep 02, 2011 9:54 pm

Re: iOS and Android builds fail, dgVector has no member 'm_i

Postby Julio Jerez » Sun Nov 10, 2013 2:28 pm

OH I see, when I look at the header I beleibe that the define si in fact automatic
Code: Select all
#if defined (__USE_DOUBLE_PRECISION__) || defined (__ppc__) || defined (ANDROID) || defined (IOS)
   #undef DG_SSE4_INSTRUCTIONS_SET
   #ifndef DG_SCALAR_VECTOR_CLASS
      #define DG_SCALAR_VECTOR_CLASS
   #endif      
#endif

the real problem is that m_ix tah are defined in the call, I am adding that now.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: iOS and Android builds fail, dgVector has no member 'm_i

Postby Julio Jerez » Sun Nov 10, 2013 2:40 pm

Ok I fixed the scalar vector class now.
I did test it by it should work.

ideally there should be a ARM 8 simd vector version, but I am no familiar with that, and I have never made and ARM project.
I believe there is one for Newton core 200, maybe one day I converted to core 300, but for now the scale will have to do.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: iOS and Android builds fail, dgVector has no member 'm_i

Postby pHySiQuE » Sun Nov 10, 2013 3:00 pm

I'm not too concerned with the speed of physics on ARM devices. Thank you.
pHySiQuE
 
Posts: 608
Joined: Fri Sep 02, 2011 9:54 pm


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron