【发布时间】:2014-07-28 02:06:58
【问题描述】:
我已下载 stb_image.h (https://github.com/nothings/stb) 并包含在我想使用的 .cpp 文件中。
然后我用函数加载图片
image_data = stbi_load(fileNames[i], &image_width, &image_height, &image_pixel_components, 0);
当我尝试在 Visual Studio 中运行代码时出现错误:
Error 3 error LNK2019: unresolved external symbol _stbi_load referenced in function "public: bool __thiscall CubemapTexture::Load(void)" (?Load@CubemapTexture@@QAE_NXZ) ...\CubemapTexture.obj
Error 40 error LNK2001: unresolved external symbol _stbi_load ...\Texture.obj
【问题讨论】:
标签: c++ visual-studio-2012 compiler-errors