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

Linker errors when building in Visual Studio and 0.9.2 #74

Open
ghost opened this issue Feb 12, 2016 · 2 comments
Open

Linker errors when building in Visual Studio and 0.9.2 #74

ghost opened this issue Feb 12, 2016 · 2 comments

Comments

@ghost
Copy link

ghost commented Feb 12, 2016

I am trying to add this library to a project using Visual Studio and of9.2.1, I am getting these errors upon trying to build:

2>     Creating library bin\WSClient_debug.lib and object bin\WSClient_debug.exp
2>Client.obj : error LNK2019: unresolved external symbol _lws_set_log_level referenced in function "public: bool __thiscall ofxLibwebsockets::Client::connect(struct ofxLibwebsockets::ClientOptions)" (?connect@Client@ofxLibwebsockets@@QAE_NUClientOptions@2@@Z)
2>Server.obj : error LNK2001: unresolved external symbol _lws_set_log_level
2>Client.obj : error LNK2019: unresolved external symbol _libwebsocket_create_context referenced in function "public: bool __thiscall ofxLibwebsockets::Client::connect(struct ofxLibwebsockets::ClientOptions)" (?connect@Client@ofxLibwebsockets@@QAE_NUClientOptions@2@@Z)
2>Server.obj : error LNK2001: unresolved external symbol _libwebsocket_create_context
2>Client.obj : error LNK2019: unresolved external symbol _libwebsocket_context_destroy referenced in function "public: virtual void __thiscall ofxLibwebsockets::Client::close(void)" (?close@Client@ofxLibwebsockets@@UAEXXZ)
2>Server.obj : error LNK2001: unresolved external symbol _libwebsocket_context_destroy
2>Client.obj : error LNK2019: unresolved external symbol _libwebsocket_service referenced in function "private: virtual void __thiscall ofxLibwebsockets::Client::threadedFunction(void)" (?threadedFunction@Client@ofxLibwebsockets@@EAEXXZ)
2>Server.obj : error LNK2001: unresolved external symbol _libwebsocket_service
2>Client.obj : error LNK2019: unresolved external symbol _libwebsocket_client_connect referenced in function "public: bool __thiscall ofxLibwebsockets::Client::connect(struct ofxLibwebsockets::ClientOptions)" (?connect@Client@ofxLibwebsockets@@QAE_NUClientOptions@2@@Z)
2>Client.obj : error LNK2019: unresolved external symbol _libwebsocket_get_internal_extensions referenced in function "public: bool __thiscall ofxLibwebsockets::Client::connect(struct ofxLibwebsockets::ClientOptions)" (?connect@Client@ofxLibwebsockets@@QAE_NUClientOptions@2@@Z)
2>Server.obj : error LNK2001: unresolved external symbol _libwebsocket_get_internal_extensions
2>Connection.obj : error LNK2019: unresolved external symbol _libwebsocket_write referenced in function "public: void __thiscall ofxLibwebsockets::Connection::update(void)" (?update@Connection@ofxLibwebsockets@@QAEXXZ)
2>Connection.obj : error LNK2019: unresolved external symbol _libwebsocket_callback_on_writable referenced in function "public: void __thiscall ofxLibwebsockets::Connection::update(void)" (?update@Connection@ofxLibwebsockets@@QAEXXZ)
2>Util.obj : error LNK2001: unresolved external symbol _libwebsocket_callback_on_writable
2>Connection.obj : error LNK2019: unresolved external symbol _libwebsocket_get_socket_fd referenced in function "public: void __thiscall ofxLibwebsockets::Connection::setupAddress(void)" (?setupAddress@Connection@ofxLibwebsockets@@QAEXXZ)
2>Reactor.obj : error LNK2001: unresolved external symbol _libwebsocket_get_socket_fd
2>Connection.obj : error LNK2019: unresolved external symbol _libwebsockets_get_peer_addresses referenced in function "public: void __thiscall ofxLibwebsockets::Connection::setupAddress(void)" (?setupAddress@Connection@ofxLibwebsockets@@QAEXXZ)
2>Reactor.obj : error LNK2001: unresolved external symbol _libwebsockets_get_peer_addresses
2>Protocol.obj : error LNK2019: unresolved external symbol _libwebsocket_callback_on_writable_all_protocol referenced in function "public: void __thiscall ofxLibwebsockets::Protocol::broadcast(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?broadcast@Protocol@ofxLibwebsockets@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
2>Reactor.obj : error LNK2019: unresolved external symbol _libwebsockets_serve_http_file referenced in function "public: unsigned int __thiscall ofxLibwebsockets::Reactor::_http(struct libwebsocket *,char const * const)" (?_http@Reactor@ofxLibwebsockets@@QAEIPAUlibwebsocket@@QBD@Z)
2>Reactor.obj : error LNK2019: unresolved external symbol _libwebsocket_is_final_fragment referenced in function "public: unsigned int __thiscall ofxLibwebsockets::Reactor::_notify(class ofxLibwebsockets::Connection *,enum libwebsocket_callback_reasons,char const * const,unsigned int)" (?_notify@Reactor@ofxLibwebsockets@@QAEIPAVConnection@2@W4libwebsocket_callback_reasons@@QBDI@Z)
2>Reactor.obj : error LNK2019: unresolved external symbol _libwebsockets_remaining_packet_payload referenced in function "public: unsigned int __thiscall ofxLibwebsockets::Reactor::_notify(class ofxLibwebsockets::Connection *,enum libwebsocket_callback_reasons,char const * const,unsigned int)" (?_notify@Reactor@ofxLibwebsockets@@QAEIPAVConnection@2@W4libwebsocket_callback_reasons@@QBDI@Z)
2>Reactor.obj : error LNK2019: unresolved external symbol _lws_frame_is_binary referenced in function "public: unsigned int __thiscall ofxLibwebsockets::Reactor::_notify(class ofxLibwebsockets::Connection *,enum libwebsocket_callback_reasons,char const * const,unsigned int)" (?_notify@Reactor@ofxLibwebsockets@@QAEIPAVConnection@2@W4libwebsocket_callback_reasons@@QBDI@Z)
2>Util.obj : error LNK2019: unresolved external symbol _libwebsockets_get_protocol referenced in function "int __cdecl ofxLibwebsockets::lws_client_callback(struct libwebsocket_context *,struct libwebsocket *,enum libwebsocket_callback_reasons,void *,void *,unsigned int)" (?lws_client_callback@ofxLibwebsockets@@YAHPAUlibwebsocket_context@@PAUlibwebsocket@@W4libwebsocket_callback_reasons@@PAX3I@Z)
2>bin\WSClient_debug.exe : fatal error LNK1120: 16 unresolved externals

Anyone know what's going on?

@robotconscience
Copy link
Owner

Hm, looks like you're not adding libwebsockets to your library paths!

Did you make/update the project in the project generator? If not, check on the readme–although I just realized, you'll need to repeat the steps in the readme for the 64-bit version of the library as well! Best to use the project generator if you can! :)

@robotconscience
Copy link
Owner

Hello, did you have an luck with this? Want to see if I can close this bug or not. Thanks!

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

No branches or pull requests

1 participant