diff --git a/build/make.linux64.so.py b/build/make.linux64.so.py index 8104754..9c9c283 100644 --- a/build/make.linux64.so.py +++ b/build/make.linux64.so.py @@ -16,6 +16,7 @@ builddir = "./build_linux64" doinstall = True #copies the build_output to the install dir when finished cc = "gcc" #compiler +# -fvisibility=hidden -- stripping symbols to avoid namespace pollution doesn't seem to work on Linux cflags = "-fPIC -O3 -DEXPORT_AMSCIMGLIB4" libraries = "-l{} -ljpeg -lpng -lz -lm".format(libname) libdirs = "-L{} -L{}/lib -L{}/lib".format(builddir,commondir,depdir) diff --git a/build/make.linux64.test.py b/build/make.linux64.test.py index b9d7147..b348109 100644 --- a/build/make.linux64.test.py +++ b/build/make.linux64.test.py @@ -14,7 +14,7 @@ depdir = "./dependencies/linux64" #local pre-compiled dependency libraries and t installdir = "../../linux64" #directory to install to when finished builddir = "./build_linux64" -doinstall = False #copies the build_output to the install dir when finished +doinstall = True #copies the build_output to the install dir when finished cc = "gcc" #compiler cflags = "-fPIC -O3" libraries = "-l{}".format(libname) diff --git a/build/make.mingw64.dll.py b/build/make.mingw64.dll.py index cee0f9a..463135d 100644 --- a/build/make.mingw64.dll.py +++ b/build/make.mingw64.dll.py @@ -7,14 +7,14 @@ from shutil import copytree from amsbuildlib4 import * -libname = "amscimglib4.mingw64" #static library name to generate +libname = "amscimglib4.winx64" #static library name to generate binname = "tests" #create this executable when compiling main.c or main.cpp commondir = "../../winx64" #common directory to pul libraries and includes from depdir = "./dependencies/winx64" #local pre-compiled dependency libraries and their includes installdir = "../../winx64" #directory to install to when finished builddir = "./build_mingw64" -doinstall = False #copies the build_output to the install dir when finished +doinstall = True #copies the build_output to the install dir when finished cc = "x86_64-w64-mingw32-gcc" #compiler cflags = "-fPIC -O3 -DEXPORT_AMSCIMGLIB4" libraries = "-l{} -ljpeg -lpng -lz -lm".format(libname) @@ -54,7 +54,7 @@ callproc("x86_64-w64-mingw32-strip --strip-all --discard-all {}/lib{}.dll".forma if(doinstall): #Push any libraries to the common lib folder shutil.copy( - '{}/lib{}.lib'.format(builddir,libname), + '{}/lib{}.a'.format(builddir,libname), "{}/lib".format(installdir) ) diff --git a/build/make.mingw64.test.py b/build/make.mingw64.test.py index 5ec0cd7..12eca52 100644 --- a/build/make.mingw64.test.py +++ b/build/make.mingw64.test.py @@ -7,14 +7,14 @@ from shutil import copytree from amsbuildlib4 import * -libname = "amscimglib4.mingw64" #static library name to generate +libname = "amscimglib4.winx64" #static library name to generate binname = "tests" #create this executable when compiling main.c or main.cpp commondir = "../../winx64" #common directory to pul libraries and includes from depdir = "./dependencies/winx64" #local pre-compiled dependency libraries and their includes installdir = "../../winx64" #directory to install to when finished builddir = "./build_mingw64" -doinstall = False #copies the build_output to the install dir when finished +doinstall = True #copies the build_output to the install dir when finished cc = "x86_64-w64-mingw32-gcc" #compiler cflags = "-fPIC -O3" libraries = "-l{}".format(libname) diff --git a/build/make.msvc64.dll.py b/build/make.msvc64.dll.py index e143bd1..ed8a106 100644 --- a/build/make.msvc64.dll.py +++ b/build/make.msvc64.dll.py @@ -7,14 +7,14 @@ from shutil import copytree from amsbuildlib4 import * -libname = "amscimglib4.msvc64" #static library name to generate +libname = "amscimglib4.winx64" #static library name to generate binname = "tests.exe" #create this executable when compiling main.c or main.cpp commondir = "../../winx64" #common directory to pul libraries and includes from depdir = "./dependencies/winx64" #local pre-compiled dependency libraries and their includes installdir = "../../winx64" #directory to install to when finished builddir = "./build_msvc64" -doinstall = False #copies the build_output to the install dir when finished +doinstall = True #copies the build_output to the install dir when finished cc = "cl" #compiler cflags = "/MT /O2 /DEXPORT_TEMPLATEDLL" libraries = "lib{}.lib".format(libname) diff --git a/build_linux64/libamscimglib4.linux64.a b/build_linux64/libamscimglib4.linux64.a index 5687b4f..889d11a 100644 Binary files a/build_linux64/libamscimglib4.linux64.a and b/build_linux64/libamscimglib4.linux64.a differ diff --git a/build_linux64/libamscimglib4.linux64.so b/build_linux64/libamscimglib4.linux64.so index f95d8bd..fe55311 100644 Binary files a/build_linux64/libamscimglib4.linux64.so and b/build_linux64/libamscimglib4.linux64.so differ diff --git a/build_linux64/objstore/amscimglib4_bitmap.o b/build_linux64/objstore/amscimglib4_bitmap.o index 9ecc5a7..fc753be 100644 Binary files a/build_linux64/objstore/amscimglib4_bitmap.o and b/build_linux64/objstore/amscimglib4_bitmap.o differ diff --git a/build_linux64/objstore/amscimglib4_image.o b/build_linux64/objstore/amscimglib4_image.o index 58a3e14..d80ec3d 100644 Binary files a/build_linux64/objstore/amscimglib4_image.o and b/build_linux64/objstore/amscimglib4_image.o differ diff --git a/build_linux64/objstore/amscimglib4_util.o b/build_linux64/objstore/amscimglib4_util.o index d1572b2..afe56ca 100644 Binary files a/build_linux64/objstore/amscimglib4_util.o and b/build_linux64/objstore/amscimglib4_util.o differ diff --git a/build_mingw64/libamscimglib4.mingw64.a b/build_mingw64/libamscimglib4.winx64.a similarity index 61% rename from build_mingw64/libamscimglib4.mingw64.a rename to build_mingw64/libamscimglib4.winx64.a index 8f1fef4..089c742 100644 Binary files a/build_mingw64/libamscimglib4.mingw64.a and b/build_mingw64/libamscimglib4.winx64.a differ diff --git a/build_mingw64/libamscimglib4.mingw64.dll b/build_mingw64/libamscimglib4.winx64.dll similarity index 99% rename from build_mingw64/libamscimglib4.mingw64.dll rename to build_mingw64/libamscimglib4.winx64.dll index 2b8844a..0e6e243 100644 Binary files a/build_mingw64/libamscimglib4.mingw64.dll and b/build_mingw64/libamscimglib4.winx64.dll differ diff --git a/build_mingw64/tests.exe b/build_mingw64/tests.exe index 3690b62..983a6ea 100644 Binary files a/build_mingw64/tests.exe and b/build_mingw64/tests.exe differ diff --git a/include/amscimglib4/amscimglib4.h b/include/amscimglib4/amscimglib4.h index 0d53d9c..ef3a06b 100644 --- a/include/amscimglib4/amscimglib4.h +++ b/include/amscimglib4/amscimglib4.h @@ -12,8 +12,9 @@ #define AMSCIMGLIB4_API __declspec(dllimport) #endif #else - //#define AMSCPPDLL_API __attribute__((visibility("default"))) - #define AMSCIMGLIB4_API + #define AMSCIMGLIB4_API __attribute__((visibility("default"))) + //#define AMSCIMGLIB4_API + //#define AMSCIMGLIB4_API __attribute__((visibility("hidden"))) #endif #ifdef __cplusplus