From 31e946d866a1a5d5cffd8b7781b46fd0730b5ed0 Mon Sep 17 00:00:00 2001 From: Test User Date: Fri, 3 Apr 2026 09:04:50 +0800 Subject: [PATCH 1/2] Fix incorrect namespace comment placement in example.cpp The `// namespace` comment was placed after the `printShape` function closing brace instead of the actual anonymous namespace closing brace. This has been corrected. Co-Authored-By: Claude Opus 4.6 (1M context) --- example.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/example.cpp b/example.cpp index 178ca35..bdbd2d1 100644 --- a/example.cpp +++ b/example.cpp @@ -58,7 +58,7 @@ void printShape(const syNumpy::NpyArray& array) { std::cout << array.shape()[i]; } std::cout << ")\n"; -} // namespace +} template void printValues(const std::vector& values, const char* label) { @@ -69,7 +69,7 @@ void printValues(const std::vector& values, const char* label) { std::cout << "\n"; } -} +} // namespace int main() { try { From 452bd61a25a243ecd69ad1d6f8d36cb76604c7a9 Mon Sep 17 00:00:00 2001 From: Test User Date: Fri, 3 Apr 2026 09:04:58 +0800 Subject: [PATCH 2/2] Add Windows shared library symbol export support When building as a shared library on Windows, enable automatic symbol export via CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS. This prevents linker errors when using the library as a DLL on Windows platforms. Co-Authored-By: Claude Opus 4.6 (1M context) --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 70d1e4e..05dcf70 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,6 +4,11 @@ project(synumpy VERSION 1.9.7 LANGUAGES CXX) include(GNUInstallDirs) +# Automatically export symbols on Windows when building a shared library +if(WIN32 AND BUILD_SHARED_LIBS) + set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) +endif() + option(SYNUMPY_BUILD_EXAMPLE "Build the example executable" ON) add_library(synumpy synumpy.cpp)