sockpp icon indicating copy to clipboard operation
sockpp copied to clipboard

Cannot use UDP sockets: unresolved external symbol

Open goldeneas opened this issue 3 years ago • 3 comments

When I try to create an UDP socket using this library an unresolved external symbol errors pops up. However this does not happen if I try to create a TCP socket. What should I do?

goldeneas avatar Mar 03 '23 22:03 goldeneas

Perhaps it would be helpful if you show us the error.

fpagliughi avatar Mar 04 '23 00:03 fpagliughi

here it is: https://snipboard.io/Do9Ubm.jpg

goldeneas avatar Mar 04 '23 10:03 goldeneas

OK. It's better if you paste in the text of the sample and error(s) rather than adding an image or a link.

So a trivial UDP example (on Windows x64) that creates and binds an IPv4 UDP socket is complaining that sockpp::datagram_socket::create_handle(int, int) is missing.

That's odd... the function is completely defined in the header: https://github.com/fpagliughi/sockpp/blob/f3100f575b38e83a1f2464ca54228bebb1282679/include/sockpp/datagram_socket.h#L76-L78

Plus this same idea is implemented in the UDP echo server example which, last I checked, compiles and run fine on Windows. https://github.com/fpagliughi/sockpp/blob/f3100f575b38e83a1f2464ca54228bebb1282679/examples/udp/udpechosvr.cpp#L91-L100

So far, I can't think of what would cause this, but I can test it from a stand-alone app to see if it does anything weird.

fpagliughi avatar Mar 04 '23 20:03 fpagliughi

Was this resolved successfully? Is there anything I need to fix?

fpagliughi avatar Sep 08 '25 17:09 fpagliughi

So much time has gone by that I forgot this issue even existed. I had probably wrongly setup something; nothing is wrong with the repo.

goldeneas avatar Sep 08 '25 17:09 goldeneas