Closed j3ffgray closed 11 years ago
Hey grayfuse,
I've run into this error, too. Unfortunately not in front of a PC right now, but can check tomorrow. In the meantime, can you check the additional include directories?
There was an error in the older projects where I was including every directory in ofxLibwebsockets. The one of note is ......\addons\ofxLibwebsockets\libs\libwebsockets\include\win32port. Make sure that there aren't any subdirectories there (e.g. ......\addons\ofxLibwebsockets\libs\libwebsockets\include\win32port\win32helpers, ......\addons\ofxLibwebsockets\libs\libwebsockets\include\win32port\win32helpers\sys)
Let me know if that works! Again, will double check tomorrow AM.
Well, that helped with the ctime issues. Getting a bunch of unresolved external symbols now. I'll keep digging around, but let me know if you've ever run into this.
1>MSVCRTD.lib(cinitexe.obj) : warning LNK4098: defaultlib 'msvcrt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library
1>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)
1>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)
1>Server.obj : error LNK2001: unresolved external symbol _libwebsocket_create_context
1>Client.obj : error LNK2001: unresolved external symbol _libwebsocket_internal_extensions
1>Server.obj : error LNK2019: unresolved external symbol _libwebsocket_internal_extensions referenced in function "int cdecl ofxLibwebsockets::lws_callback(struct libwebsocket_context ,struct libwebsocket ,enum libwebsocket_callback_reasons,void ,void ,unsigned int)" (?lws_callback@ofxLibwebsockets@@YAHPAUlibwebsocket_context@@PAUlibwebsocket@@W4libwebsocket_callback_reasons@@PAX3I@Z)
1>Client.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)
1>Server.obj : error LNK2001: unresolved external symbol _libwebsockets_get_protocol
1>Client.obj : error LNK2019: unresolved external symbol _libwebsocket_context_destroy referenced in function "public: void thiscall ofxLibwebsockets::Client::close(void)" (?close@Client@ofxLibwebsockets@@QAEXXZ)
1>Reactor.obj : error LNK2001: unresolved external symbol _libwebsocket_context_destroy
1>Client.obj : error LNK2019: unresolved external symbol _libwebsocket_close_and_free_session referenced in function "public: void __thiscall ofxLibwebsockets::Client::close(void)" (?close@Client@ofxLibwebsockets@@QAEXXZ)
1>Reactor.obj : error LNK2001: unresolved external symbol _libwebsocket_close_and_free_session
1>Client.obj : error LNK2019: unresolved external symbol _libwebsocket_service referenced in function "private: virtual void thiscall ofxLibwebsockets::Client::threadedFunction(void)" (?threadedFunction@Client@ofxLibwebsockets@@EAEXXZ)
1>Server.obj : error LNK2001: unresolved external symbol _libwebsocket_service
1>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)
1>Reactor.obj : error LNK2001: unresolved external symbol _libwebsockets_get_peer_addresses
1>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)
1>Connection.obj : error LNK2019: unresolved external symbol _libwebsocket_write referenced in function "public: void thiscall ofxLibwebsockets::Connection::send(class std::basic_string<char,struct std::char_traits
yes, it looks like the libwebsockets libs aren't being linked in correctly. First, you need to add the ofxLibwebsockets paths to the "Additional Library Directories":
Apologies if the example projects are messed up! I'm using ofxLws in a Windows-based install right now, so I'll be updating everything to work much better ASAP!
That did the trick, thanks! The documentation for manually setting linker settings and includes in Visual C++ for openFrameworks is very stark (especially since they are moving towards having people just use the projectGenerator), so this is very helpful in general since I'm usually strictly in Xcode. Thanks a bunch, and thats for a great WebSocket wrapper addon! :)
Trying to port over an Xcode project to VS10 using this library, and I'm running into a bunch of ctime errors. It also appears to be happening when I try running the examples as well. A dump of the errors is below, any ideas?