<div dir="ltr">I'm having an issue with linking enet/winsock under MinGW32, and I'm not understanding why it's failing to work. Make will fail immediately if it couldn't find the libraries, so it can find them (and I verified they are in the path)...but it's still failing. I compiled enet in the same environment, so I don't think it has to do with enet using different library versions<div>
<br></div><div><br></div><div><div>/c/MinGW/bin/g++.exe      -Wl,--whole-archive CMakeFiles/ArchaicServer.dir/objects.a -Wl,--no-whole-archive  -o bin/ArchaicServer.exe -Wl,--out-implib,libArchaicServer.dll.a -Wl,--major-image-version,0,--minor-image-version,0  -L../ArchaicEngine  -lwsock32 -lwinmm -lws2_32 -lenet -larchaicengine -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32</div>
<div><br></div><div>c:/mingw/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/</div><div>../lib/libenet.a(win32.o): In function `enet_initialize':</div><div>c:\library\enet/win32.c:19: undefined reference to `_imp__WSAStartup@8'</div>
<div>c:\library\enet/win32.c:30: undefined reference to `_imp__timeBeginPeriod@4'</div><div>c:\library\enet/win32.c:25: undefined reference to `_imp__WSACleanup@0'</div><div>c:/mingw/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/</div>
<div>../lib/libenet.a(win32.o): In function `enet_deinitialize':</div><div>c:\library\enet/win32.c:38: undefined reference to `_imp__timeEndPeriod@4'</div><div>c:\library\enet/win32.c:40: undefined reference to `_imp__WSACleanup@0'</div>
<div>c:/mingw/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/</div><div>../lib/libenet.a(win32.o): In function `enet_host_random_seed':</div><div>c:\library\enet/win32.c:46: undefined reference to `_imp__timeGetTime@0'</div>
<div>c:/mingw/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/</div><div>../lib/libenet.a(win32.o): In function `enet_time_get':</div><div>c:\library\enet/win32.c:52: undefined reference to `_imp__timeGetTime@0'</div>
<div>c:/mingw/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/</div><div>../lib/libenet.a(win32.o): In function `enet_time_set':</div><div>c:\library\enet/win32.c:58: undefined reference to `_imp__timeGetTime@0'</div>
<div>c:/mingw/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/</div><div>../lib/libenet.a(win32.o): In function `enet_address_set_host':</div><div>c:\library\enet/win32.c:66: undefined reference to `_imp__gethostbyname@4'</div>
<div>c:\library\enet/win32.c:70: undefined reference to `_imp__inet_addr@4'</div><div>c:/mingw/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/</div><div>../lib/libenet.a(win32.o): In function `enet_address_get_host_ip':</div>
<div>c:\library\enet/win32.c:85: undefined reference to `_imp__inet_ntoa@4'</div><div>c:/mingw/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/</div><div>../lib/libenet.a(win32.o): In function `enet_address_get_host':</div>
<div>c:\library\enet/win32.c:100: undefined reference to `_imp__gethostbyaddr@12'</div><div>c:/mingw/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/</div><div>../lib/libenet.a(win32.o): In function `enet_socket_bind':</div>
<div>c:\library\enet/win32.c:120: undefined reference to `_imp__htons@4'</div><div>c:\library\enet/win32.c:129: undefined reference to `_imp__bind@12'</div><div>c:/mingw/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/</div>
<div>../lib/libenet.a(win32.o): In function `enet_socket_get_address':</div><div>c:\library\enet/win32.c:140: undefined reference to `_imp__getsockname@12'</div><div>c:\library\enet/win32.c:144: undefined reference to `_imp__ntohs@4'</div>
<div>c:/mingw/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/</div><div>../lib/libenet.a(win32.o): In function `enet_socket_listen':</div><div>c:\library\enet/win32.c:152: undefined reference to `_imp__listen@8'</div>
<div>c:/mingw/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/</div><div>../lib/libenet.a(win32.o): In function `enet_socket_create':</div><div>c:\library\enet/win32.c:158: undefined reference to `_imp__socket@12'</div>
<div>c:/mingw/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/</div><div>../lib/libenet.a(win32.o): In function `enet_socket_set_option':</div><div>c:\library\enet/win32.c:199: undefined reference to `_imp__setsockopt@20'</div>
<div>c:\library\enet/win32.c:170: undefined reference to `_imp__ioctlsocket@12'</div><div>c:\library\enet/win32.c:179: undefined reference to `_imp__setsockopt@20'</div><div>c:/mingw/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/</div>
<div>../lib/libenet.a(win32.o): In function `enet_socket_get_option':</div><div>c:\library\enet/win32.c:216: undefined reference to `_imp__getsockopt@20'</div><div>c:/mingw/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/</div>
<div>../lib/libenet.a(win32.o): In function `enet_socket_connect':</div><div>c:\library\enet/win32.c:234: undefined reference to `_imp__htons@4'</div><div>c:\library\enet/win32.c:237: undefined reference to `_imp__connect@12'</div>
<div>c:\library\enet/win32.c:238: undefined reference to `_imp__WSAGetLastError@0'</div><div>c:/mingw/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/</div><div>../lib/libenet.a(win32.o): In function `enet_socket_accept':</div>
<div>c:\library\enet/win32.c:251: undefined reference to `_imp__accept@12'</div><div>c:\library\enet/win32.c:261: undefined reference to `_imp__ntohs@4'</div><div>c:\library\enet/win32.c:251: undefined reference to `_imp__accept@12'</div>
<div>c:/mingw/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/</div><div>../lib/libenet.a(win32.o): In function `enet_socket_shutdown':</div><div>c:\library\enet/win32.c:270: undefined reference to `_imp__shutdown@8'</div>
<div>c:/mingw/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/</div><div>../lib/libenet.a(win32.o): In function `enet_socket_destroy':</div><div>c:\library\enet/win32.c:277: undefined reference to `_imp__closesocket@4'</div>
<div>c:/mingw/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/</div><div>../lib/libenet.a(win32.o): In function `enet_socket_send':</div><div>c:\library\enet/win32.c:294: undefined reference to `_imp__htons@4'</div>
<div>c:\library\enet/win32.c:298: undefined reference to `_imp__WSASendTo@36'</div><div>c:\library\enet/win32.c:308: undefined reference to `_imp__WSAGetLastError@0'</div><div>c:/mingw/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/</div>
<div>../lib/libenet.a(win32.o): In function `enet_socket_receive':</div><div>c:\library\enet/win32.c:328: undefined reference to `_imp__WSARecvFrom@36'</div><div>c:\library\enet/win32.c:354: undefined reference to `_imp__ntohs@4'</div>
<div>c:\library\enet/win32.c:338: undefined reference to `_imp__WSAGetLastError@0'</div><div>c:/mingw/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/</div><div>../lib/libenet.a(win32.o): In function `enet_socketset_select':</div>
<div>c:\library\enet/win32.c:368: undefined reference to `_imp__select@20'</div><div>c:/mingw/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/lib/</div><div>../lib/libenet.a(win32.o): In function `enet_socket_wait':</div>
<div>c:\library\enet/win32.c:390: undefined reference to `_imp__select@20'</div><div>c:\library\enet/win32.c:400: undefined reference to `__WSAFDIsSet@8'</div><div>c:\library\enet/win32.c:403: undefined reference to `__WSAFDIsSet@8'</div>
<div>../ArchaicEngine/libarchaicengine.a(NetworkPeer.cpp.obj):NetworkPeer.cpp:(.text+</div><div>0x51): undefined reference to `enet_peer_disconnect'</div><div>../ArchaicEngine/libarchaicengine.a(NetworkPeer.cpp.obj):NetworkPeer.cpp:(.text+</div>
<div>0x8c): undefined reference to `enet_peer_send'</div><div>../ArchaicEngine/libarchaicengine.a(NetworkPeer.cpp.obj):NetworkPeer.cpp:(.text+</div><div>0xca): undefined reference to `enet_packet_create'</div><div>
../ArchaicEngine/libarchaicengine.a(NetworkPeer.cpp.obj):NetworkPeer.cpp:(.text+</div><div>0xea): undefined reference to `enet_peer_send'</div><div>c:/mingw/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/bin/</div>
<div>ld.exe: ../ArchaicEngine/libarchaicengine.a(NetworkPeer.cpp.obj): bad reloc addr</div><div>ess 0x20 in section `.eh_frame'</div><div>collect2.exe: error: ld returned 1 exit status</div><div>make[2]: *** [bin/ArchaicServer.exe] Error 1</div>
<div>make[2]: Leaving directory `/c/projects/archaicengine/archaicserver'</div><div>make[1]: *** [CMakeFiles/ArchaicServer.dir/all] Error 2</div><div>make[1]: Leaving directory `/c/projects/archaicengine/archaicserver'</div>
<div>make: *** [all] Error 2</div></div></div>