diff --git a/base/dependencies/macros.hpp b/base/dependencies/macros.hpp index 82235d8..c8ad2d7 100644 --- a/base/dependencies/macros.hpp +++ b/base/dependencies/macros.hpp @@ -26,7 +26,7 @@ #endif // GEN_API #ifndef global // Global variables -# ifdef GEN_DYN_EXPORT +# if defined(GEN_STATIC_LINK) || defined(GEN_DYN_LINK) # define global # else # define global static diff --git a/scripts/build.ci.ps1 b/scripts/build.ci.ps1 index 1ae81b9..3809bf3 100644 --- a/scripts/build.ci.ps1 +++ b/scripts/build.ci.ps1 @@ -263,6 +263,7 @@ if ( $c_lib_static ) $compiler_args += $flag_all_c $compiler_args += $flag_updated_cpp_macro $compiler_args += $flag_c11 + $compiler_args += ($flag_define + 'GEN_STATIC_LINK') $linker_args = @() $result = build-simple $path_build $includes $compiler_args $linker_args $unit $path_lib