ohmtal Posted March 7, 2021 Posted March 7, 2021 Hello, I use a modified torque2d and got android studio work. It build fine for x86 and armeabi-v7a. But when I add x86_64 build it does not like the offset macro anymore. I've played around with the ifdef's for gcc but no luck so far and I don't understand the problem at the moment.On : addField("actionName", TypeString, Offset(mActionName, UndoAction),..i get: error: cast from pointer to smaller type 'int' loses informationI defined the macro for x86_64/android to:#define Offset(x, cls) ((dsize_t)(&((cls *) 1)->x) - 1) because the following replacement works: addField("actionName", TypeString, ((dsize_t) (&((UndoAction *) 1)->mActionName) - 1),... for me the macro and the test replacement, which works, looks equal.Edit: I also changed the dsize_t typedef in types.arm.h: #if defined(__x86_64__) || defined(__x86_64) typedef unsigned long long dsize_t; #else typedef unsigned long dsize_t; #endif Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.