Goodevening guys,
I'm trying to compile a simple SDL project with gcc in mac OSX Maverick...
This is my main.c file:
In facts my function do nothing but I just want to see if I can compile.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10 #include <stdio.h> #include <stdlib.h> #include <SDL/SDL.h> int main( int argc, char *argv[]) { SDL_Init(SDL_INIT_VIDEO); printf("Grande!\n"); SDL_Quit(); return 1; }
So I've tried to compile like that gcc -lSDL -o main main.c, but I get the message:
ld: library not found for -lSDL
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I've included SDLMain.h and SDLMain.m files in the same folder of main.c
I've correctly installed SDL framework in /System/Library/Frameworks.
I've searched a lot around internet for a solution but I can't get one, so I ask if you have any suggestion
Thaks!
Partager