diff --git a/.github/workflows/05-windows-build.yml b/.github/workflows/05-windows-build.yml index dcdbda3ab..bd0f545ae 100644 --- a/.github/workflows/05-windows-build.yml +++ b/.github/workflows/05-windows-build.yml @@ -141,7 +141,7 @@ jobs: Copy-Item $dll.FullName -Destination . -Force Write-Host "Copied $dllName from $($dll.DirectoryName)" } else { - Write-Error "$dllName not found anywhere under $buildDir" + Write-Host "WARNING: $dllName not found (all-in-one libs are static on MSVC, DLL not needed)" } } } diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 5fc4e34ea..6cc6d2264 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -36,9 +36,18 @@ function(zvec_add_all_in_one_shared TARGET_NAME OUTPUT_NAME) "// Auto-generated stub for ${TARGET_NAME}\n" ) - add_library(${TARGET_NAME} SHARED - ${CMAKE_CURRENT_BINARY_DIR}/${TARGET_NAME}_stub.cc - ) + # MSVC: build as STATIC to avoid LNK1189 (PE/COFF 65535 export limit). + # WINDOWS_EXPORT_ALL_SYMBOLS is silently ignored for static libraries. + # Consumers (fts_bench, examples) still link against this target normally. + if(MSVC) + add_library(${TARGET_NAME} STATIC + ${CMAKE_CURRENT_BINARY_DIR}/${TARGET_NAME}_stub.cc + ) + else() + add_library(${TARGET_NAME} SHARED + ${CMAKE_CURRENT_BINARY_DIR}/${TARGET_NAME}_stub.cc + ) + endif() set_target_properties(${TARGET_NAME} PROPERTIES OUTPUT_NAME "${OUTPUT_NAME}"