I am getting this error
"Incomplete type not allowed"
the line getting this error :
Vec3 MaxHeight;
you should search first before asking, and you can find the error here and i'm guessing the needed cpp is this in here
add
#include <vec3.h>
to your project
Well, to fix it you have to make Vec3
a complete type, i.e. you have to define it (as opposed to merely declaring it).
Note that it is possible that it is not about "including the header file", as the other answers suggest. If you forgot to include the header, the compiler would probably know nothing about Vec3
. The error message would be different. In your case the compiler knows Vec3
, but it just happens to be incomplete.
What caused this situation is impossible to tell from what you posted (you essentially posted nothing). If you do include the header file that defined Vec3
, then the problem might be caused by circular header inclusion or something like that.
Almost all the time, I come across this by including one file from the library that declares Vec3, but not including the header that includes Vec3 itself.
This happens because sometimes the other headers "forward declare" Vec3 so they can use in their function definitions, but they don't need a complete definition.