Original Post
I am trying out some code I found in a MUD book to create a socket. I am getting errors about undefined references. Ex. undefined reference to #include "winsock2.h" #include "ws2tcpip.h" Does the order matter? And does it matter if I write them like this? #include #include #include Is there a library in Code:Blocks I should use instead of winsock2.h? Also I searched the forums but could not reply to retired threads... here is another thread I looked at for similar errors. http://www.gamedev.net/community/forums/topic.asp?topic_id=466034 Is there a better reference for this stuff? I am using th Mud Game Programming book... he states not to use int for sockets and use the typedef but his code uses int. =/.
_socket@12' undefined reference to _WSAStartup@8' I think it is a linking issue or maybe the library i am using. I am using Code:Blocks IDE Here are my includes: #include