stb-image - 使用 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。这应该有效:
#define STB_IMAGE_IMPLEMENTATION
#include <stb_image.h>
推荐阅读
- apache-kafka - kafka 如何处理对同一代理上的多个分区的写入,而不会随着磁盘寻道的发生而减慢速度
- yocto - 我可以在 thud meta-tegra 分支中使用 meta-tegra master 分支的 cuda 文件夹吗?
- ios - 如何将未发布的 iOS 应用程序移至另一个同名帐户?
- java - 如何减少 Firestore 集合中的读取次数?
- macos - 如何让Brew在安装前显示公式的大小?
- vuejs2 - 在 VueJS 中构建后扩展 env 变量
- python - 如何从在云控制台上创建的服务帐户访问与我的 client_email 共享的 google 表格
- scala - 在子类中生成字符串实现
- kotlin - 科特林。如何在按钮向上事件上执行代码
- javascript - 导出图表引发 RangeError:highcharts-more.js 中超出最大调用堆栈大小