In my main.h file, I #include "skybox.h"
. In skybox.h, stb_image.h is included (the latest version from GitHub as of 29-1-2017). Unlike any other library I've encountered, before including stb_image.h the docs say to #define STB_IMAGE_IMPLEMENTATION
. I have tried putting this before including stb_image.h (in skybox.h), before including skybox.h (in main.h), both, and none. None of them work, the linker outputs all the duplicates from between build/main.o and build/skybox.o.
ld: 33 duplicate symbols for architecture x86_64
is the error given when linking. Also, I am doing the #define from the header file stb_image.h, but have tried doing it from the source file, which does not help.