Skip to content

Commit

Permalink
Merge pull request #20 from p12tic/stb-image-symbols-internal-linkage
Browse files Browse the repository at this point in the history
Use internal linkage for symbols from stb_image.h
  • Loading branch information
BrunoLevy authored Sep 24, 2022
2 parents 336a33c + 9c1e160 commit cbc24cd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/lib/geogram/image/image_serializer_stb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@
#define STB_IMAGE_IMPLEMENTATION
#define STB_IMAGE_WRITE_IMPLEMENTATION

// Use internal linkage for symbols from stb_image as it is a very commonly embedded library.
// Making these symbols visible causes duplicate symbol problems if geogram is linked
// statically together with another library or executable that also embeds stb_image.
#define STB_IMAGE_STATIC

// [Bruno] I got too many complaints in STB so I "close my eyes" :-)
#ifdef __GNUC__
#ifndef __ICC
Expand Down

0 comments on commit cbc24cd

Please sign in to comment.