Building Polyscope as a shared library on Windows
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 35/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 停滯
- 技術堆疊
- cmake, cpp
研究方向
從 src/CMakeLists.txt 中的 shared-library 目標開始,然後搭配 GLM 建置設定檢查 deps/imgui/CMakeLists.txt 和 deps/stb/CMakeLists.txt。執行 Windows shared-library 建置並確定已核准的相依性/匯出設定;在沒有未解析符號的情況下完成連結即表示完成。
由索引模型根據 Issue 內容生成。
描述
On Windows, I managed to build polyscope as a shared library with a couple of changes:
- Export all symbols for polyscope
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -374,4 +374,7 @@
set_target_properties(polyscope PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
add_definitions(-DNOMINMAX)
+set_target_properties(polyscope PROPERTIES
+ WINDOWS_EXPORT_ALL_SYMBOLS ON
+)
# Include settings
- Force
imguias static. Again, it would search for a .lib file but no symbols are exported.
--- a/deps/imgui/CMakeLists.txt
+++ b/deps/imgui/CMakeLists.txt
@@ -63,5 +63,5 @@
add_library(
- imgui
+ imgui STATIC
${SRCS}
)
Alternative: Export all symbols like 1.
- Force
stbas static. Otherwise, it would search for a non-existent .lib file because no symbols are exported.
--- a/deps/stb/CMakeLists.txt
+++ b/deps/stb/CMakeLists.txt
@@ -1,5 +1,5 @@
# Create a library for the viewer code
add_library(
- stb
+ stb STATIC
stb_impl.cpp
)
I tried exporting all symbols but it did not work. I would get missing symbols:
[build] screenshot.cpp.obj : error LNK2001: unresolved external symbol "int stbi_write_png_compression_level" (?stbi_write_png_compression_level@@3HA)
- Tell glm to not build a library. It is header-only anyway:
set(GLM_BUILD_LIBRARY OFF CACHE BOOL "Use GLM as header-only" FORCE)
It is not optimal to export all symbols on Windows, but it works. Dropping this here for others to use.
Open to make a PR but I would rather figure out the approved method first 😄
- 主要語言
- C++
- 星號
- 2.2k
- 分支
- 242
- 平均合併
- 11 分鐘
- 30 天內合併 PR
- 1
貢獻指南
這個儲存庫沒有索引到貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
nmwsharp/polyscope 的其他 Issue
-
難度 5/5 一週以上 新手友好度 35/100
-
難度 3/5 1-2 天 新手友好度 48/100
-
難度 5/5 一週以上 新手友好度 30/100
-
Rust Version 未關閉
難度 5/5 一週以上 新手友好度 15/100
-
enhancement
難度 5/5 一週以上 新手友好度 20/100
查看 nmwsharp/polyscope 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 75/100
flutter-webrtc/flutter-webrtc#2206 ·
-
難度 2/5 1-3 小時 新手友好度 70/100
google-ai-edge/LiteRT-LM#3739 ·
-
Component: GLib
難度 2/5 1-3 小時 新手友好度 70/100
-
難度 2/5 1-3 小時 新手友好度 65/100
brave/brave-browser#59300 ·
-
Mute ydb/tests/functional/dstool/test_canonical_requests.py.Test.test_group_take_snapshot in main 未關閉ai_reviewed
難度 2/5 1-3 小時 新手友好度 70/100
ydb-platform/ydb#53974 · 3 則留言 ·