# SDL\_image: Use hidden visibility by default for avif, jxl, and webp builds

**URL:** <https://discourse.libsdl.org/t/sdl-image-use-hidden-visibility-by-default-for-avif-jxl-and-webp-builds/37768>\
**Category:** SDL Commits\
**Created:** [July 16, 2022, 4:44pm UTC](https://discourse.libsdl.org/t/sdl-image-use-hidden-visibility-by-default-for-avif-jxl-and-webp-builds/37768 "2022-07-16T16:44:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![SDLPushPostBot](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/sdlpushpostbot/32/4370_2.png) [@SDLPushPostBot](https://discourse.libsdl.org/u/SDLPushPostBot)\
**Post date:** [July 16, 2022, 4:44pm UTC](https://discourse.libsdl.org/t/sdl-image-use-hidden-visibility-by-default-for-avif-jxl-and-webp-builds/37768/1 "2022-07-16T16:44:01Z")

</div>

> <https://github.com/libsdl-org/SDL_image/commit/d87f58cefada3d4ea87562cc013578d037bae673>

```diff
From d87f58cefada3d4ea87562cc013578d037bae673 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Sat, 16 Jul 2022 09:43:23 -0700
Subject: [PATCH] Use hidden visibility by default for avif, jxl, and webp
 builds

---
 Xcode/avif/avif.xcodeproj/project.pbxproj | 14 ++++++++++++--
 Xcode/jxl/jxl.xcodeproj/project.pbxproj | 2 ++
 Xcode/webp/webp.xcodeproj/project.pbxproj | 2 ++
 3 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/Xcode/avif/avif.xcodeproj/project.pbxproj b/Xcode/avif/avif.xcodeproj/project.pbxproj
index 954fc173..39292794 100644
--- a/Xcode/avif/avif.xcodeproj/project.pbxproj
+++ b/Xcode/avif/avif.xcodeproj/project.pbxproj
@@ -598,7 +598,12 @@
 				GCC_DYNAMIC_NO_PIC = NO;
 				GCC_NO_COMMON_BLOCKS = YES;
 				GCC_OPTIMIZATION_LEVEL = 0;
- GCC_PREPROCESSOR_DEFINITIONS = AVIF_CODEC_DAV1D;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ AVIF_DLL,
+ AVIF_BUILDING_SHARED_LIBS,
+ AVIF_CODEC_DAV1D,
+ );
+ GCC_SYMBOLS_PRIVATE_EXTERN = YES;
 				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
 				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
 				GCC_WARN_UNDECLARED_SELECTOR = YES;
@@ -665,7 +670,12 @@
 				ENABLE_STRICT_OBJC_MSGSEND = YES;
 				GCC_C_LANGUAGE_STANDARD = gnu11;
 				GCC_NO_COMMON_BLOCKS = YES;
- GCC_PREPROCESSOR_DEFINITIONS = AVIF_CODEC_DAV1D;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ AVIF_DLL,
+ AVIF_BUILDING_SHARED_LIBS,
+ AVIF_CODEC_DAV1D,
+ );
+ GCC_SYMBOLS_PRIVATE_EXTERN = YES;
 				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
 				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
 				GCC_WARN_UNDECLARED_SELECTOR = YES;
diff --git a/Xcode/jxl/jxl.xcodeproj/project.pbxproj b/Xcode/jxl/jxl.xcodeproj/project.pbxproj
index 6daeb5d3..e75134f4 100644
--- a/Xcode/jxl/jxl.xcodeproj/project.pbxproj
+++ b/Xcode/jxl/jxl.xcodeproj/project.pbxproj
@@ -605,6 +605,7 @@
 					"JPEGXL_PATCH_VERSION=1",
 					JPEGXL_ENABLE_TRANSCODE_JPEG,
 				);
+ GCC_SYMBOLS_PRIVATE_EXTERN = YES;
 				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
 				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
 				GCC_WARN_UNDECLARED_SELECTOR = YES;
@@ -679,6 +680,7 @@
 					"JPEGXL_PATCH_VERSION=1",
 					JPEGXL_ENABLE_TRANSCODE_JPEG,
 				);
+ GCC_SYMBOLS_PRIVATE_EXTERN = YES;
 				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
 				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
 				GCC_WARN_UNDECLARED_SELECTOR = YES;
diff --git a/Xcode/webp/webp.xcodeproj/project.pbxproj b/Xcode/webp/webp.xcodeproj/project.pbxproj
index 49ed6c0e..d9785acc 100644
--- a/Xcode/webp/webp.xcodeproj/project.pbxproj
+++ b/Xcode/webp/webp.xcodeproj/project.pbxproj
@@ -653,6 +653,7 @@
 					"DEBUG=1",
 					"$(inherited)",
 				);
+ GCC_SYMBOLS_PRIVATE_EXTERN = YES;
 				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
 				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
 				GCC_WARN_UNDECLARED_SELECTOR = YES;
@@ -713,6 +714,7 @@
 				ENABLE_STRICT_OBJC_MSGSEND = YES;
 				GCC_C_LANGUAGE_STANDARD = gnu11;
 				GCC_NO_COMMON_BLOCKS = YES;
+ GCC_SYMBOLS_PRIVATE_EXTERN = YES;
 				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
 				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
 				GCC_WARN_UNDECLARED_SELECTOR = YES;

```
