使用 stbi_set_flip_vertically_on_load 函数时出现未解决的错误

Unresolved Error while using stbi_set_flip_vertically_on_load function

我在使用 stbi_set_flip_vertically_on_load 函数时遇到未解决的符号错误。

我已经将 #include 文件添加为 header ,我还需要做其他事情吗?

stb_image - v2.19

#include <stb_image.h>

stbi_set_flip_vertically_on_load(true); // this gives unresolved symbol error though

你还需要编译stb_image。这应该有效:

#define STB_IMAGE_IMPLEMENTATION
#include <stb_image.h>