Hiya,
I'm sure the headers are included properly. I get 'type not found' errors if I comment out the #include statements.
In the exact same file I have :-
// This works as expected
void bmx_sfText_getPosition(const sfText* text, sfVector2f* position) {
*position = sfText_getPosition(text);
}
and further down in the same file I have :-
// This function works as expected
void bmx_sfSprite_setOrigin(const sfSprite* sprite, sfVector2f* origin) {
sfSprite_setOrigin(sprite,*origin);
}
// This function gives me an error
void bmx_sfSprite_getPosition(const sfSprite* sprite,sfVector2f* position) {
*position = sfSprite_getPosition(sprite);
}
All of the wrapper functions are in the one file which includes the other type functions and also the other sfSprite functions too which are confirmed to be working.
As a part of trying to hone in with whats happening if I do this inside the above function body :-
sfVector2f position;
position = sfSprite_getPosition(sprite);
then I get 'error: incompatible types when assigning to type 'sfVector2f' from type 'int''
as opposed to this:-
sfVector2f pos = sfSprite_getPosition(sprite);
which gives the error in the original post.
Are there any clues in there? How is it possible for the compiler to get an 'int' reference from anywhere or is this a default of some kind?
I can't really give a 'working' example of it in effect as this is a wrapper bindings for a different language and there is only this one 'C' file that gets imported into the other language.
Thanks for your help.
Dave.