Installing SDL on OSX

前端 未结 4 1113
面向向阳花
面向向阳花 2021-01-16 02:30

I downloaded SDL2-2.0.3. I ran ./configure && make && make install.

I\'ve also tried brew install SDL2.

<
4条回答
  •  心在旅途
    2021-01-16 03:27

    You are failing to link with libSDL2.{a,dylib}.

    You want:

    gcc -o main main.c -lSDL2
    

    or perhaps:

    gcc -o main main.c -L/usr/local/lib -lSDL2
    

提交回复
热议问题