SIMD Sony Vector Math Library in OS X with C ++

I am currently writing a very simple game engine for the job and make the code a lot nicer. I decided to use a vector math library. One of my teachers showed me the Sony Vector Math library, which is used in the Bullet Physics engine, and that's fine, as far as I can tell. This works fine for me on Linux, but I have problems porting it to work in OS X (intel, Snow Leopard). I correctly included the files in my project, but the C ++ library version does not seem to compile. I can get the version of the C library, but it has a rather unpleasant API compared to the C ++ version, and the whole reason for using this library was to clear the code first.

http://glosx.blogspot.com/2008/07/sony-vector-math-library.html

Does this blog post that I came across seem to be prompting something with the compiler? It is quite short, so I could not get a lot of information from it.

When I try to use the C ++ version, I get the following errors (extended view of each error):

/usr/include/vectormath/cpp/../SSE/cpp/vectormath_aos.h:156:0
/usr/include/vectormath/cpp/../SSE/cpp/vectormath_aos.h:156: 
error: '__forceinline' does not name a type

second error:

/Developer/apps/gl test/main.cpp:7:0 In file included from /Developer/apps/gl test/main.cpp

/usr/include/vectormath/cpp/vectormath_aos.h:38:0 In file included from   
/usr/include/vectormath/cpp/vectormath_aos.h

/usr/include/vectormath/cpp/../SSE/cpp/vectormath_aos.h:330:0 In file included from
/usr/include/vectormath/cpp/../SSE/cpp/vectormath_aos.h

/usr/include/vectormath/cpp/../SSE/cpp/vecidx_aos.h:45:0 Expected constructor, destructor, 
or type conversion before '(' token in     /usr/include/vectormath/cpp/../SSE/cpp/vecidx_aos.h

Finally, two errors at the end of the main.cpp file:

Expected '}' at the end of input
Expected '}' at the end of input

My heart appeared, but I can not find any answers or anything to point me in the right direction so that any help is received.

Thank,

+3
source share
4 answers

OS X? Xcode 3.2 4 , - gcc 4.2. , gcc 4.0.

0

__forceinline - , -. , __forceinline, .

, . : -D__forceinline=inline -D__forceinline=__attribute__((always_inline)) (, !)

+1

, SSE Microsoft Visual Studio. (Mac ..) .

\Extras\vectormathlibrary\\vectormath\\CPP

+1
source

It looks like someone fixed this and posted a fixed version in response to this same problem.

Now compatible with GCC.

+1
source

Source: https://habr.com/ru/post/1735130/


All Articles