<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
It is awesome that you posted this. Thank you. In this spirit I will
post something I was struggling with.<br>
<br>
I had an issue using ENet with Allegro with Visual C++ 9. The
headers need to be:<br>
<blockquote>#define _WINSOCKAPI_
<br>
#define ALLEGRO_STATICLINK
<br>
#define ALLEGRO_NO_ASM
<br>
<br>
#include <allegro.h>
<br>
#include <winalleg.h>
<br>
#include <enet/enet.h>
<br>
</blockquote>
and the libs needs to be<br>
<blockquote>alleg_s_crt.lib kernel32.lib user32.lib gdi32.lib
comdlg32.lib ole32.lib dinput.lib ddraw.lib dxguid.lib winmm.lib
dsound.lib enet.lib ws2_32.lib<br>
</blockquote>
Any other order in the headers threw a mess of unresolved external
symbols which took me a decent amount of time to figure out. As you
can probably tell I am statically linking Allegro. This should also
work with Allegro being dynamically linked (obviously with <i>#define
ALLEGRO_STATICLINK</i> removed).
<div class="moz-signature"><br>
<hr style="height: 1px;">
<p><span style="font-weight: bold;">Nicholas J Ingrassellino<br>
<a style="text-decoration: none;"
href="http://www.lifebloodnetworks.com/" target="_blank">LifebloodNetworks.com</a></span>
|| <a style="text-decoration: none;"
href="mailto:nick@lifebloodnetworks.com">nick@lifebloodnetworks.com</a></p>
<p style="font-size: 75%;">"<span style="font-style: italic;">The
idea that I can be presented with a problem, set out to
logically solve it with the tools at hand, and wind up with a
program that could not be legally used because someone else
followed the same logical steps some years ago and filed for a
patent on it is horrifying.</span>"<br>
- <span style="font-weight: bold;">John Carmack</span> on
software patents</p>
</div>
<br>
On 11/24/2010 08:43 AM, fuzzy spoon wrote:
<blockquote
cite="mid:AANLkTikc0xADkCySwq9cy7LspR1vE-91bUnSuTzGpY1a@mail.gmail.com"
type="cite">
<div>Steps to reproduce : </div>
<div> Drop code into existing solution.</div>
<div> Make sure you are linking to WS2_32.lib and
Winmm.lib</div>
<div> Make sure that you have defined WIN32_LEAN_AND_MEAN</div>
<div>Build.</div>
<div><br>
</div>
<div>Problem : Linker errors ( timeBeginPeriod etc from winmm.lib,
called from enet_initialize).<br>
</div>
<div><br>
</div>
<div>Fix: Due to WIN32_LEAN_AND_MEAN , mmsystem.h is no longer
included in the chain that enet relied on before.</div>
<div><br>
</div>
<div>At the top of win32.h, Line 18 (added underneath the other
includes).</div>
<div><br>
</div>
<div>#ifdef WIN32_LEAN_AND_MEAN<br>
#include <mmsystem.h><br>
#endif /* WIN32_LEAN_AND_MEAN */<br>
</div>
<div>
<br>
</div>
<div><br>
</div>
<div>Hopefully this will save someone some time.</div>
<div><br>
</div>
<div><br>
</div>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
ENet-discuss mailing list
<a class="moz-txt-link-abbreviated" href="mailto:ENet-discuss@cubik.org">ENet-discuss@cubik.org</a>
<a class="moz-txt-link-freetext" href="http://lists.cubik.org/mailman/listinfo/enet-discuss">http://lists.cubik.org/mailman/listinfo/enet-discuss</a>
</pre>
</blockquote>
</body>
</html>