How do you include files in C++ from the /Library/Framework folder in MAC

前端 未结 2 630
面向向阳花
面向向阳花 2020-12-14 21:44

I am trying to use SDL. I have a folder in /Library/Frameworks called SDL2.framework. I want to include the file SDL.h in my project.

2条回答
  •  忘掉有多难
    2020-12-14 22:14

    you will want to make a build script for this obviously, but the important parts are:

    -I/usr/local/include or wherever your headers get installed.

    I used home brew:

    brew install sdl2

    which puts the libraries in /usr/local/Cellar/

    so if you need to specify the lib path you will also add:

    -L/usr/local/lib -lSDL2

    I also changed your include line to #include

提交回复
热议问题