I'm attempting to use cpprestsdk, to establish a simple websocket connection:
#include <cpprest/ws_client.h>
using namespace web;
using namespace web::websockets::client;
int main(int argc, char* argv[])
{
websocket_callback_client client;
client.connect(U("ws://localhost:1234")).then([]() { /* We've finished connecting. */ });
}
However, when I run the application I get error LNK2001: unresolved external symbol "public: __thiscall web::websockets::client::websocket_callback_client::websocket_callback_client(void)" (??0websocket_callback_client@client@websockets@web@@QAE@XZ)
I have included bcrypt.lib;winhttp.lib;crypt32.lib;
in Linker, and also made reference to _NO_ASYNCRTIMP;
in C/C++ -> Preprocessor, but I can't seem to escape this issue.
I can make simple http requests with the SDK it appears only websockets are causing the issue. I also installed this package using VCPKG and am using the Win32 build of the sdk.
Thanks, George