How to include correct with using gcc: <SDL2/SDL.h>
or <SDL.h>
and set -I/usr/include/SDL2
?
如何正确使用gcc:
2 个解决方案
#1
0
Well, either are valid, but I think its far more polite to use that one that makes the compile command easier and more obvious, ie #include , thus you dont need to alter the include search path.
嗯,这两种方法都是有效的,但是我认为使用那个使编译命令更容易和更明显的方法(包括,因此您不需要更改include搜索路径)是很有礼貌的。
#2
0
I think this command will work:
我认为这个命令会起作用:
g++ main.cpp -I/Library/Frameworks/SDL2.framework/Headers -F/Library/Frameworks -framework SDL2
#1
0
Well, either are valid, but I think its far more polite to use that one that makes the compile command easier and more obvious, ie #include , thus you dont need to alter the include search path.
嗯,这两种方法都是有效的,但是我认为使用那个使编译命令更容易和更明显的方法(包括,因此您不需要更改include搜索路径)是很有礼貌的。
#2
0
I think this command will work:
我认为这个命令会起作用:
g++ main.cpp -I/Library/Frameworks/SDL2.framework/Headers -F/Library/Frameworks -framework SDL2