can't use static globals on static libs

This commit is contained in:
Edward R. Gonzalez 2025-02-04 21:23:51 -05:00
parent 3bce2e9b8a
commit dda70fce36
2 changed files with 2 additions and 1 deletions

View File

@ -26,7 +26,7 @@
#endif // GEN_API #endif // GEN_API
#ifndef global // Global variables #ifndef global // Global variables
# ifdef GEN_DYN_EXPORT # if defined(GEN_STATIC_LINK) || defined(GEN_DYN_LINK)
# define global # define global
# else # else
# define global static # define global static

View File

@ -263,6 +263,7 @@ if ( $c_lib_static )
$compiler_args += $flag_all_c $compiler_args += $flag_all_c
$compiler_args += $flag_updated_cpp_macro $compiler_args += $flag_updated_cpp_macro
$compiler_args += $flag_c11 $compiler_args += $flag_c11
$compiler_args += ($flag_define + 'GEN_STATIC_LINK')
$linker_args = @() $linker_args = @()
$result = build-simple $path_build $includes $compiler_args $linker_args $unit $path_lib $result = build-simple $path_build $includes $compiler_args $linker_args $unit $path_lib