Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/opengl/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/cassandra/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ 使用soil2库链接错误时出现问题,soil2 debug.lib(soil2.obj)中已经定义了sprintf_C++_Opengl_Visual Studio 2013_Soil - Fatal编程技术网

C++ 使用soil2库链接错误时出现问题,soil2 debug.lib(soil2.obj)中已经定义了sprintf

C++ 使用soil2库链接错误时出现问题,soil2 debug.lib(soil2.obj)中已经定义了sprintf,c++,opengl,visual-studio-2013,soil,C++,Opengl,Visual Studio 2013,Soil,我已经在链接器提示符中尝试了不同的搜索命令,我使用的是visual studio 2013/NODEFAULTLIB:MSVCRT/MD 我的目标是加载一个使用openGL和soil2库显示图像的应用程序 但是没有结果,我用来加载图像的代码: //纹理初始化 int image_width=0; int image_height=0; 无符号字符*image=SOIL\u load\u image(“images/sklero.png,&image\u width,&image\u height

我已经在链接器提示符中尝试了不同的搜索命令,我使用的是visual studio 2013<代码>/NODEFAULTLIB:MSVCRT/MD

我的目标是加载一个使用openGL和soil2库显示图像的应用程序
但是没有结果,我用来加载图像的代码:

//纹理初始化
int image_width=0;
int image_height=0;
无符号字符*image=SOIL\u load\u image(“images/sklero.png,&image\u width,&image\u height,NULL,SOIL\u load\u RGBA);
胶合纹理0;
glGenTextures(1和0);
glBindTexture(GL_TEXTURE_2D,texture0);
glTexParameteri(GL_纹理_2D,GL_纹理_包裹,GL_重复);//x
glTexParameteri(GL_纹理_2D,GL_纹理_包裹,GL_重复);//Y
glTexParameteri(GL_纹理2D、GL_纹理MAG_过滤器、GL_线性MIPMAP_线性);
glTexParameteri(GL_纹理2D、GL_纹理最小过滤器、GL_线性);
如果(图像)
{
GLTEXAGE2D(GL_纹理_2D,0,GL_RGBA,图像宽度,图像高度,0,GL_RGBA,GL_无符号字节,图像);
GLGENATEMIPMAP(GL_纹理_2D);
}
其他的
{
标准::cout