首页 > 解决方案 > 使用 stbi_set_flip_vertically_on_load 函数时未解决的错误

问题描述

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

我已将#include <stb_image.h> 文件添加为标题,我还需要做其他事情吗?

stb_image - v2.19

#include <stb_image.h>

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

标签: stb-image

解决方案


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

#define STB_IMAGE_IMPLEMENTATION
#include <stb_image.h>

推荐阅读