diff --git a/lcl/interfaces/qt5/cbindings/Qt5Pas.pro b/lcl/interfaces/qt5/cbindings/Qt5Pas.pro index 7283b115a8..e835e2b93a 100644 --- a/lcl/interfaces/qt5/cbindings/Qt5Pas.pro +++ b/lcl/interfaces/qt5/cbindings/Qt5Pas.pro @@ -25,7 +25,7 @@ TEMPLATE = lib VPATH = src MOC_DIR = tmp OBJECTS_DIR = tmp -QMAKE_CXXFLAGS += -Wfatal-errors +QMAKE_CXXFLAGS += -Wfatal-errors -fvisibility=hidden # Match Intel x86_64 i686 i586 i386 x86 ... is86 = $$find(QMAKE_HOST.arch, ".*86") diff --git a/lcl/interfaces/qt5/cbindings/src/pascalbind.h b/lcl/interfaces/qt5/cbindings/src/pascalbind.h index 096de7fd20..8d7c94d33f 100644 --- a/lcl/interfaces/qt5/cbindings/src/pascalbind.h +++ b/lcl/interfaces/qt5/cbindings/src/pascalbind.h @@ -30,7 +30,7 @@ #if defined(__WIN32__) #define C_EXPORT extern "C" __declspec( dllexport ) #else -#define C_EXPORT extern "C" +#define C_EXPORT extern "C" __attribute__(( visibility("default") )) #endif #ifdef __WIN32__ diff --git a/lcl/interfaces/qt6/cbindings/Qt6Pas.pro b/lcl/interfaces/qt6/cbindings/Qt6Pas.pro index 50b69f2f14..22fb9db5ea 100644 --- a/lcl/interfaces/qt6/cbindings/Qt6Pas.pro +++ b/lcl/interfaces/qt6/cbindings/Qt6Pas.pro @@ -25,7 +25,7 @@ TEMPLATE = lib VPATH = src MOC_DIR = tmp OBJECTS_DIR = tmp -QMAKE_CXXFLAGS += -Wfatal-errors +QMAKE_CXXFLAGS += -Wfatal-errors -fvisibility=hidden # Match Intel x86_64 i686 i586 i386 x86 ... is86 = $$find(QMAKE_HOST.arch, ".*86") diff --git a/lcl/interfaces/qt6/cbindings/src/pascalbind.h b/lcl/interfaces/qt6/cbindings/src/pascalbind.h index 6f5b4b7aa3..6e8df8e17c 100644 --- a/lcl/interfaces/qt6/cbindings/src/pascalbind.h +++ b/lcl/interfaces/qt6/cbindings/src/pascalbind.h @@ -29,7 +29,7 @@ #if defined(WIN32) || defined(__WIN32) || defined(__WIN32__) #define C_EXPORT extern "C" __declspec( dllexport ) #else -#define C_EXPORT extern "C" +#define C_EXPORT extern "C" __attribute__(( visibility("default") )) #endif #if defined(WIN32) || defined(__WIN32) || defined(__WIN32__)