Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unresolved external error building cpprestsdk against Windows-asio without websockets #1457

Open
paoldev opened this issue Jul 1, 2020 · 0 comments · May be fixed by #1466
Open

Unresolved external error building cpprestsdk against Windows-asio without websockets #1457

paoldev opened this issue Jul 1, 2020 · 0 comments · May be fixed by #1466

Comments

@paoldev
Copy link

paoldev commented Jul 1, 2020

This issue is different from the one described at #1252 .

In a Windows project of mine, building cpprestsdk against asio, without websockets, I get following unresolved external errors:

http_client_asio.obj : error LNK2019: unresolved external symbol "public: static class crossplat::threadpool & __cdecl crossplat::threadpool::shared_instance(void)" (?shared_instance@threadpool@crossplat@@SAAEAV12@XZ) referenced in function "public: __cdecl web::http::client::details::asio_connection_pool::asio_connection_pool(void)" (??0asio_connection_pool@details@client@http@web@@QEAA@XZ) [src\cpprest.vcxproj]
http_server_asio.obj : error LNK2001: unresolved external symbol "public: static class crossplat::threadpool & __cdecl crossplat::threadpool::shared_instance(void)" (?shared_instance@threadpool@crossplat@@SAAEAV12@XZ) [src\cpprest.vcxproj] 

My environment

  • cpprestsdk 2.10.16 @ 7fbb08c
  • VS2019

Repro steps
From the command prompt at the root folder containing cpprestsdk and its internal vcpkg

cpprestsdk\vcpkg\bootstrap-vcpkg.bat
cpprestsdk\vcpkg\vcpkg.exe install boost-asio:x64-windows
mkdir build.asio
cd build.asio
cmake -A x64 -DCMAKE_TOOLCHAIN_FILE="..\cpprestsdk\vcpkg\scripts\buildsystems\vcpkg.cmake" -DCPPREST_HTTP_CLIENT_IMPL=asio -DCPPREST_HTTP_LISTENER_IMPL=asio -DCPPREST_EXCLUDE_WEBSOCKETS:BOOL=ON -DCPPREST_EXCLUDE_COMPRESSION:BOOL=ON -DBUILD_TESTS:BOOL=OFF -DBUILD_SAMPLES:BOOL=OFF "..\cpprestsdk\Release"
cmake --build .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant