无法使用gcc编译SDL源文件


0

我下载了SDL图形编程简介手册,所以我尝试编译我的第一个源,它记录了下一个错误

编译它的命令是:

$ gcc helloWorld.c [-o helloWorld] $(sdl-config --cflags --libs)

并且日志是:

gcc: error: [-o: No such file or directory
gcc: error: helloWorld]: No such file or directory

Answers:


0

不要在命令中使用[方括号]。试试这个:

$ gcc helloWorld.c -o helloWorld $(sdl-config --cflags --libs)

如果解决了您的问题,请选择此答案旁边的复选标记。
Kevin Panko
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.