Title: Build Issue: Linker errors when building with shared library option · Issue #438 · socketio/socket.io-client-cpp · GitHub
Open Graph Title: Build Issue: Linker errors when building with shared library option · Issue #438 · socketio/socket.io-client-cpp
X Title: Build Issue: Linker errors when building with shared library option · Issue #438 · socketio/socket.io-client-cpp
Description: Environment OS: Windows on ARM64 Compiler: Clang (LLVM) Build System: CMake with Ninja Repository: socket.io-client-cpp (latest version from main branch) Steps to Reproduce: Cloned the repository recursively: git clone --recursive https:...
Open Graph Description: Environment OS: Windows on ARM64 Compiler: Clang (LLVM) Build System: CMake with Ninja Repository: socket.io-client-cpp (latest version from main branch) Steps to Reproduce: Cloned the repository r...
X Description: Environment OS: Windows on ARM64 Compiler: Clang (LLVM) Build System: CMake with Ninja Repository: socket.io-client-cpp (latest version from main branch) Steps to Reproduce: Cloned the repository r...
Opengraph URL: https://github.com/socketio/socket.io-client-cpp/issues/438
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Build Issue: Linker errors when building with shared library option","articleBody":"**Environment**\n\n- OS: Windows on ARM64\n- Compiler: Clang (LLVM)\n- Build System: CMake with Ninja\n- Repository: socket.io-client-cpp (latest version from main branch)\n\n**Steps to Reproduce:**\n\n- Cloned the repository recursively:\n\n```\ngit clone --recursive https://github.com/socketio/socket.io-client-cpp.git\ncd socket.io-client-cpp\n```\n\n- Generated build files with CMake:\n\n`cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON`\n`ninja`\n\n**Error**\n\nThe main library seems to build but when linking the test executable, I'm getting multiple \"undefined symbol\" errors for various methods in the sio::packet class:\n\n```\n[113/113] Linking CXX executable test\\sio_test.exe\nFAILED: test/sio_test.exe\nC:\\Windows\\system32\\cmd.exe /C \"cd . \u0026\u0026 C:\\PROGRA~1\\LLVM\\bin\\CLANG_~1.EXE -nostartfiles -nostdlib -O3 -DNDEBUG -D_DLL -D_MT -Xclang --dependent-lib=msvcrt -Xlinker /subsystem:console -fuse-ld=lld-link test/CMakeFiles/sio_test.dir/sio_test.cpp.obj -o test\\sio_test.exe -Xlinker /MANIFEST:EMBED -Xlinker /implib:test\\sio_test.lib -Xlinker /pdb:test\\sio_test.pdb -Xlinker /version:0.0 _deps/catch2-build/src/Catch2Main.lib sioclient.lib _deps/catch2-build/src/Catch2.lib -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 -loldnames \u0026\u0026 cd .\"\nlld-link: error: undefined symbol: public: __cdecl sio::packet::packet(class std::basic_string\u003cchar, struct std::char_traits\u003cchar\u003e, class std::allocator\u003cchar\u003e\u003e const \u0026, class std::shared_ptr\u003cclass sio::message\u003e const \u0026, int, bool)\n\u003e\u003e\u003e referenced by test/CMakeFiles/sio_test.dir/sio_test.cpp.obj:(void __cdecl CATCH2_INTERNAL_TEST_0(void))\n\u003e\u003e\u003e referenced by test/CMakeFiles/sio_test.dir/sio_test.cpp.obj:(void __cdecl CATCH2_INTERNAL_TEST_12(void))\n\nlld-link: error: undefined symbol: public: enum sio::packet::frame_type __cdecl sio::packet::get_frame(void) const\n\u003e\u003e\u003e referenced by test/CMakeFiles/sio_test.dir/sio_test.cpp.obj:(void __cdecl CATCH2_INTERNAL_TEST_0(void))\n```\n","author":{"url":"https://github.com/TheGorge7","@type":"Person","name":"TheGorge7"},"datePublished":"2025-04-09T03:56:00.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/438/socket.io-client-cpp/issues/438"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:6aa59789-278e-7f0e-b80d-585ca6086d47 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EDE4:1D39:4D42A87:6707730:698C8BBC |
| html-safe-nonce | c3aad9e00fd58cc93235fd26588f8d9c5b721c1ab6c10c28693c2c9c39eed6f3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFREU0OjFEMzk6NEQ0MkE4Nzo2NzA3NzMwOjY5OEM4QkJDIiwidmlzaXRvcl9pZCI6IjI1NjYzNjI2ODc2MzkxNjE3ODgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 73b6f057156131b420e7771eedfba3b792516b08bf6896137d7bc36d1eee92d3 |
| hovercard-subject-tag | issue:2981462186 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/socketio/socket.io-client-cpp/438/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0ad43cb9ffc9bff00dd5e1dbc5673b1cd68b8d869f69d60bbfe3a4cf98925811/socketio/socket.io-client-cpp/issues/438 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0ad43cb9ffc9bff00dd5e1dbc5673b1cd68b8d869f69d60bbfe3a4cf98925811/socketio/socket.io-client-cpp/issues/438 |
| og:image:alt | Environment OS: Windows on ARM64 Compiler: Clang (LLVM) Build System: CMake with Ninja Repository: socket.io-client-cpp (latest version from main branch) Steps to Reproduce: Cloned the repository r... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | TheGorge7 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 640eeb7b6ff4d8d106235d228c0c286e82592d4d2403227b5b2b4fc5832297a4 |
| turbo-cache-control | no-preview |
| go-import | github.com/socketio/socket.io-client-cpp git https://github.com/socketio/socket.io-client-cpp.git |
| octolytics-dimension-user_id | 10566080 |
| octolytics-dimension-user_login | socketio |
| octolytics-dimension-repository_id | 33086039 |
| octolytics-dimension-repository_nwo | socketio/socket.io-client-cpp |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 33086039 |
| octolytics-dimension-repository_network_root_nwo | socketio/socket.io-client-cpp |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 3d444f0a47beeeac94cddbb51c91ab408befe8d4 |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width