简体   繁体   English

不能在linux中使用SOIL薄荷

[英]can't use SOIL in linux mint

I am doing an assignment that requires me to use SOIL. 我正在做一项要求我使用SOIL的作业。 I installed it using the command sudo apt-get install libsoil-dev , but when I try to compile my program, I get the following error: 我使用命令sudo apt-get install libsoil-dev安装它,但是当我尝试编译我的程序时,我收到以下错误:

textureMain.cpp:19:18: fatal error: SOIL.h: No such file or directory
compilation terminated.
textureParams.cpp:17:18: fatal error: SOIL.h: No such file or directory
compilation terminated.

Why am I not able to compile the program even though I installed SOIL? 即使我安装了SOIL,为什么我也无法编译程序?

$ dpkg -L libsoil-dev |grep include
/usr/include
/usr/include/SOIL
/usr/include/SOIL/SOIL.h
/usr/include/SOIL/image_DXT.h
/usr/include/SOIL/image_helper.h
/usr/include/SOIL/stbi_DDS_aug.h
/usr/include/SOIL/stbi_DDS_aug_c.h
/usr/include/SOIL/stb_image_aug.h

So you probably want the following on the g++ command-line 所以你可能想要在g ++命令行上有以下内容

-I /usr/include/SOIL

Or just use the following in your C++ 或者只是在C ++中使用以下内容

#include <SOIL/SOIL.h>

And you probably want the following on the command-line when linking 并且您在链接时可能需要在命令行上执行以下操作

-lSOIL

您可能需要添加-I编译器参数以告知它在哪里找到SOIL头文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM