Open Syn9673 opened 4 years ago
^ Same here, static windows x64 build does throw the above errors. Using the none-static version works fine though.
Seeing that it still keeps copying the libcrypto-1_1-x64.dll to my folder, I'd say that is a hint where the bug comes from ... I doubt we are the only one(s) with that problem ...
yeah i doubt it as well
I finally had a bit time to look into it. Seems the CMakeLists.txt is setup a bit wrong... for our purpose "windows x64 static" build
Anyway, you need to do this in order to make it work:
then it compiles
i'll test it
it only reduced them to 4 unresolved.
main.obj : error LNK2001: unresolved external symbol "public: void __cdecl web::websockets::client::details::websocket_
client_task_impl::close_pending_tasks_with_error(class web::websockets::client::websocket_exception const &)" (?close_p
ending_tasks_with_error@websocket_client_task_impl@details@client@websockets@web@@QEAAXAEBVwebsocket_exception@345@@Z)
[C:\Users\alexa\Desktop\Projects\discord-cpp-js\build\test.vcxproj]
main.obj : error LNK2001: unresolved external symbol "public: class Concurrency::task<class web::websockets::client::we
bsocket_incoming_message> __cdecl web::websockets::client::details::websocket_client_task_impl::receive(void)" (?receiv
e@websocket_client_task_impl@details@client@websockets@web@@QEAA?AV?$task@Vwebsocket_incoming_message@client@websockets
@web@@@Concurrency@@XZ) [C:\Users\alexa\Desktop\Projects\discord-cpp-js\build\test.vcxproj]
main.obj : error LNK2001: unresolved external symbol "public: __cdecl web::websockets::client::details::websocket_clien
t_task_impl::websocket_client_task_impl(class web::websockets::client::websocket_client_config)" (??0websocket_client_t
ask_impl@details@client@websockets@web@@QEAA@Vwebsocket_client_config@234@@Z) [C:\Users\alexa\Desktop\Projects\discord-
cpp-js\build\test.vcxproj]
main.obj : error LNK2001: unresolved external symbol "public: class Concurrency::task<class std::basic_string<char,stru
ct std::char_traits<char>,class std::allocator<char> > > __cdecl web::websockets::client::websocket_incoming_message::e
xtract_string(void)const " (?extract_string@websocket_incoming_message@client@websockets@web@@QEBA?AV?$task@V?$basic_st
ring@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Concurrency@@XZ) [C:\Users\alexa\Desktop\Projects\discord-cpp-js\bu
ild\test.vcxproj]
C:\Users\alexa\Desktop\Projects\discord-cpp-js\build\Release\test.node : fatal error LNK1120: 4 unresolved externals [C
:\Users\alexa\Desktop\Projects\discord-cpp-js\build\test.vcxproj]
I haven't used websockets yet, I guess that's why I am not getting these lines. Afaik cpprestsdk uses the Websocketpp lib for that, https://github.com/zaphoyd/websocketpp/issues/623 But I'm not sure what libs that one require to link .... wild guesses: Bcrypt.lib,wldap32.lib,AdvAPI32.Lib,User32.Lib,Gdi32.Lib,winhttp.lib
Are you using VS2019 to compile ? If so, you should add this into the .vcxproj, else it was never using the static versions for me:
You probably need to install the WebSockets feature explicitly.
.\vcpkg install cpprestsdk[websockets]:x64-windows --recurse
I agree with @NLKNguyen websockets feature is needed when installing cpprestsdk. So that should be used and this could be closed AFAIK?
Hi i am using
cpprestsdk:x64-static-windows
. And i keep gettingI am compiling this as a nodejs module, this is my binding.gyp:
i was wondering why i keep getting that when i do this: