Is it necessary for <Character.h> to be defined before <raymath.h>

When I declare the libraries in the following order, I encounter the error “no suitable user-defined conversion from ‘Vector2’ to ‘Vector2’ exists”:

#include <raymath.h>
#include <Character.h>

However, when I reorder them, the error disappears:

#include <Character.h>
#include <raymath.h>

The error occurred in the line of code:

if (Vector2Length(direction) != 0.0) {
    worldPos = Vector2Add(worldPos, vectorScale);
}

Should the libraries that we create be declared first?

Ideally it shouldn’t matter, but if you’re encountering problems and that’s the fix then stick with that.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms