Small fix for Android build

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Small fix for Android build

Postby pHySiQuE » Mon Aug 19, 2013 4:22 pm

In dgtypes.h, Android apparently does not support the header files included here, so you can use the __ANDROID__ macro to comment them out. You might consider changing all instances of ANDROID to __ANDROID__ since it appears to be an automatic and reliable macro the user doesn't have to define:
http://stackoverflow.com/questions/6374 ... a-c-c-file

Code: Select all
#ifndef __ANDROID__
   #if (defined (_POSIX_VER) || defined (_POSIX_VER_64))
      #include <unistd.h>
      #include <assert.h>
      extern "C"
      {
         // for SSE3 and up
         #include <pmmintrin.h>
         // #include <immintrin.h>   
         // #include <smmintrin.h>

         #include <emmintrin.h>
         #include <mmintrin.h>
      }

   #endif
#endif
pHySiQuE
 
Posts: 608
Joined: Fri Sep 02, 2011 9:54 pm

Re: Small fix for Android build

Postby Julio Jerez » Mon Aug 19, 2013 4:51 pm

I am very confused here, are you defining _POSIX_VER or _POSIX_VER_64
for an android system?

those macros are for Unix and Linux systems. if you do not define them they the header will no be included.
there most be a set of header file for andorid systme, maybe you should add those. or are ther Unix compliance?
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Small fix for Android build

Postby pHySiQuE » Tue Sep 03, 2013 12:35 pm

Android is Linux/Unix, so yes I did define those.
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 0 guests

cron