[ENet-discuss] Linker errors when NOT compiling as a lib (embedded) [with suggested fix]

fuzzy spoon fuzzyspoon at gmail.com
Wed Nov 24 05:43:54 PST 2010


Steps to reproduce :
         Drop code into existing solution.
         Make sure you are linking to WS2_32.lib and Winmm.lib
         Make sure that you have defined WIN32_LEAN_AND_MEAN
Build.

Problem : Linker errors ( timeBeginPeriod etc from winmm.lib, called from
enet_initialize).

Fix: Due to WIN32_LEAN_AND_MEAN , mmsystem.h is no longer included in the
chain that enet relied on before.

At the top of win32.h, Line 18 (added underneath the other includes).

#ifdef WIN32_LEAN_AND_MEAN
#include <mmsystem.h>
#endif /* WIN32_LEAN_AND_MEAN */


Hopefully this will save someone some time.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cubik.org/pipermail/enet-discuss/attachments/20101124/c4b07826/attachment.html>


More information about the ENet-discuss mailing list