Closed GregSlazinski closed 5 years ago
PsVecMath.h defines namespaces
namespace physx { namespace shdfnd { namespace aos {
here: https://github.com/NVIDIAGameWorks/PhysX-3.4/blob/master/PxShared/src/foundation/include/PsVecMath.h#L74 and then includes "PsAoS.h" https://github.com/NVIDIAGameWorks/PhysX-3.4/blob/master/PxShared/src/foundation/include/PsVecMath.h#L94 which may include
which may include
Which on Android NDK looks like this:
#ifndef __ARM_NEON_H #define __ARM_NEON_H .. typedef __attribute__((neon_vector_type(4))) float32_t float32x4_t; .. #endif /* __ARM_NEON_H */
So we get something like
namespace physx { namespace shdfnd { namespace aos { #include <arm_neon.h> ..
so the actual 'float32x4_t' which should be defined in global namespace as ::float32x4_t gets defined as ::physx::shdfnd::aos::float32x4_t
which causes build errors in my software.
PhysX should NOT include the "#include " within a namespace, but outside of it.
Hi, you are right, we will try to fix it. Sorry for the trouble. Regards, Ales
PsVecMath.h defines namespaces
here: https://github.com/NVIDIAGameWorks/PhysX-3.4/blob/master/PxShared/src/foundation/include/PsVecMath.h#L74 and then includes "PsAoS.h" https://github.com/NVIDIAGameWorks/PhysX-3.4/blob/master/PxShared/src/foundation/include/PsVecMath.h#L94 which may include
include "unix/PsUnixAoS.h"
which may include
include "neon/PsUnixNeonAoS.h"
which may include
include
Which on Android NDK looks like this:
So we get something like
so the actual 'float32x4_t' which should be defined in global namespace as ::float32x4_t gets defined as ::physx::shdfnd::aos::float32x4_t
which causes build errors in my software.
PhysX should NOT include the "#include" within a namespace, but outside of it.