Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - student123

Pages: [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:

#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;

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.

Pages: [1]