SDL2:架构x86_64 / MAC的未定义符号

时间:2019-04-17 18:33:54

标签: c sdl

我可能由于SDL而出错,但找不到。

我试图强制SDL2和我的编译器之间建立链接,并检查所有字符以避免任何库中都没有的特殊字符。 我将所有所需的文件都放在同一目录中。

#include <stdio.h>
#include <SDL2/SDL.h>
#include <SDL2/SDL_ttf.h>
#include <SDL2/SDL_image.h>


//Function with picture display

//Function with text creation and text display

//Here I create an array of transparent pictures to do a Connect 4

//Here it's the thing that always appear in my window

//Here are the button of my main menu

//After all those function there's my main

It just doesn't compile with this text of error : 

    mbp-de-clement:Test grille clementdubois$ make clean; make; ./test_grille

    rm -f test_grille

    rm -f *.o

    gcc     test_grille.c   -o test_grille

    Undefined symbols for architecture x86_64:

      "_IMG_Load", referenced from:

          _main in test_grille-b3d516.o

    ... (lot of errors due to SDL) ...


    ld: symbol(s) not found for architecture x86_64

    clang: error: linker command failed with exit code 1 (use -v to see invocation)

    make: *** [test_grille] Error 1

    bash: ./test_grille: No such file or directory

I check all the posts on this site but can't find any help. I try to change my Makefile but nothing worked. I'm in desperate need of help for this project. 

0 个答案:

没有答案