Compiling OpenGL SOIL on Ubuntu

喜夏-厌秋 提交于 2019-12-10 14:37:40

问题


How do I link SOIL for a OpenGL in Ubuntu?

EDIT:

I figured out the issue, my professor showed the locate cmd in the terminal and I was able to find where I had to get the .h from.

If anyone else has this issue for me it was,

#include "SOIL/SOIL.h"

and to link -lSOIL when compiling


回答1:


First download the SOIL.h header file from its website

http://www.lonesock.net/soil.html

Place the header file in your project directory and put the line

#include "SOIL.h" 

in your project file. After that you have to install the soil library to use -lSOIL. To install the library use the command

 sudo apt-get install libsoil-dev

Now compile the project using gcc along with -lSOIL



来源:https://stackoverflow.com/questions/5739527/compiling-opengl-soil-on-ubuntu

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!