title: STB Image Implementation with tinygltf and sfml
body: <p>I am including both tinygltf and sfml in my project. When I include tinygltf with these options:</p>
  
  <pre><code>#define TINYGLTF_IMPLEMENTATION
  #define STB_IMAGE_IMPLEMENTATION
  #define STB_IMAGE_WRITE_IMPLEMENTATION
  #include &lt;tiny_gltf.h&gt;
  </code></pre>
  
  <p>I get multiple definition errors:</p>
  
  <pre><code>/usr/bin/ld.gold: error: sfml/lib/libsfml-graphics-s.a(ImageLoader.cpp.o): multiple definition of 'stbi_write_jpg'
  /usr/bin/ld.gold: _objs/client_lib/loader.pic.o: previous definition here
  </code></pre>
  
  <p>That is just a small snippet of the errors, but for most stb functions, there is a similar error. So I tried to fix this by including tinygltf like this:</p>
  
  <pre><code>#define TINYGLTF_IMPLEMENTATION
  #include &lt;tiny_gltf.h&gt;
  </code></pre>
  
  <p>However, now there is just one singular error:</p>
  
  <pre><code>_objs/client_lib/loader.pic.o:loader.cpp:function tinygltf::LoadImageData(tinygltf::Image*, int, std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;*, std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;*, int, int, unsigned char const*, int, void*): error: undefined reference to 'stbi_is_16_bit_from_memory'
  </code></pre>
  
  <p>It seems like the two libraries are depending on slightly different versions of stb. Is there any way to fix this?</p>
  
  <p>I'm using tinygltf version 2.2.0, and sfml version 2.5.1.</p>