walker95
Results
1
issues of
walker95
- 当定义`STB_IMAGE_WRITE_IMPLEMENTATION`,`stb_image_write.h`就会添加函数定义,不然只有函数申明。`C++`允许多次申明,所以只要在引用`stb_image_write.h`头文件之前`#define STB_IMAGE_WRITE_IMPLEMENTATION`,后面再使用`stb_image_write.h`的文件不能再定义`STB_IMAGE_WRITE_IMPLEMENTATION`,所以在`./stbiw/CMakeList.txt`的`target_complie_definitions()`中使用`PRIVATE`。 - 因为除`stbiw`静态库中使用`stb_image_write.h`,之后使用`stbiw`库的`main`也要使用。所以在`./stbiw/CMakeList.txt`的`target_include_directories()`中使用`PUBLIC`。 - 添加`stbiw.cc`为了可以生成库。