1
C / csfml on m1
« on: September 22, 2021, 04:11:32 pm »
I am trying to understand csfml and I am trying to execute the following code:
This breaks down on the line with Render, everything works without it.
I get this error:
Undefined symbols for architecture arm64:
"_sfRenderWindow_create", referenced from:
_main in main.c.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [engine] Error 1
make[2]: *** [CMakeFiles/engine.dir/all] Error 2
make[1]: *** [CMakeFiles/engine.dir/rule] Error 2
make: *** [engine] Error 2
I couldn't find any information on whether csfml is compatible with my processor or something I'm doing wrong, so I need help.
#include <stdio.h>
#include <SFML/Window.h>
#include <SFML/Graphics.h>
int main() {
sfVideoMode mode = {1080, 720, 32};
sfRenderWindow *window;
sfEvent event;
window = sfRenderWindow_create(mode, "csfml lib", sfResize | sfClose, NULL);
return 0;
}
#include <SFML/Window.h>
#include <SFML/Graphics.h>
int main() {
sfVideoMode mode = {1080, 720, 32};
sfRenderWindow *window;
sfEvent event;
window = sfRenderWindow_create(mode, "csfml lib", sfResize | sfClose, NULL);
return 0;
}
This breaks down on the line with Render, everything works without it.
I get this error:
Undefined symbols for architecture arm64:
"_sfRenderWindow_create", referenced from:
_main in main.c.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [engine] Error 1
make[2]: *** [CMakeFiles/engine.dir/all] Error 2
make[1]: *** [CMakeFiles/engine.dir/rule] Error 2
make: *** [engine] Error 2
I couldn't find any information on whether csfml is compatible with my processor or something I'm doing wrong, so I need help.