Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
add_library(stbiw STATIC stb_image_write.cpp),把文件添加到库里
target_include_directories(stbiw PUBLIC .),让要使用这个库的文件,可以像访问当前目录一样访问他
#define STB_IMAGE_WRITE_IMPLEMENTATION, (纯0基础萌新,看视频也找不到答案,不知道需要补什么知识。。)这一步我不懂,根据老师的提示信息,一次次尝试出来的。。。
#include <stb_image_write.h>,添加头文件进去。
我的理解是,stbiw的作用就是将需要的功能打包起来,以后需要用到,直接在CMake里设置导入就行,把功能变成一个个模块,拿过来就用,类似原子性的思想