Assimp elaborated type refers to typedef

102 views Asked by At

I am receiving the above error when trying to create a function that takes struct aiMatrix4x4* or any other aiStructs, I don't know why, I can my models properly, I just cannot make a function with the above struct as parameters for some odd reason, here's the code i question, I can even isolate it and it still gives me the error...

#include <math.h>
#include <assimp/cimport.h>
#include <assimp/scene.h>
#include <assimp/postprocess.h>
#include <assimp/matrix4x4.h>

// A Bit Later in the Code

static inline void mat4x4_loadassimp(mat4x4 M, struct aiMatrix4x4* a);

I am using the latest assimp compiled from source... with C. Using clang as the compiler.

1

There are 1 answers

4
Stargateur On BEST ANSWER

According to the doc. aiMatrix4x4 is a typedef in C++.

So you can't write struct aiMatrix4x4 in C++.

static inline void mat4x4_loadassimp(mat4x4 M, aiMatrix4x4 *a);

If you compile in C, you must write:

static inline void mat4x4_loadassimp(mat4x4 M, struct aiMatrix4x4 *a);