<div dir="ltr">Thanks! That solved the problem! The problem I had was that I didn't include ws2_32 and winmm. It was a stupid mistake of me.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jul 22, 2013 at 12:00 PM, <span dir="ltr"><<a href="mailto:enet-discuss-request@cubik.org" target="_blank">enet-discuss-request@cubik.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Send ENet-discuss mailing list submissions to<br>
<a href="mailto:enet-discuss@cubik.org">enet-discuss@cubik.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
<a href="http://lists.cubik.org/mailman/listinfo/enet-discuss" target="_blank">http://lists.cubik.org/mailman/listinfo/enet-discuss</a><br>
or, via email, send a message with subject or body 'help' to<br>
<a href="mailto:enet-discuss-request@cubik.org">enet-discuss-request@cubik.org</a><br>
<br>
You can reach the person managing the list at<br>
<a href="mailto:enet-discuss-owner@cubik.org">enet-discuss-owner@cubik.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of ENet-discuss digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
1. Re: ENet-discuss Digest, Vol 121, Issue 8 (Thorbj?rn Lindeijer)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Mon, 22 Jul 2013 09:37:58 +0200<br>
From: Thorbj?rn Lindeijer <<a href="mailto:bjorn@lindeijer.nl">bjorn@lindeijer.nl</a>><br>
To: Discussion of the ENet library <<a href="mailto:enet-discuss@cubik.org">enet-discuss@cubik.org</a>><br>
Subject: Re: [ENet-discuss] ENet-discuss Digest, Vol 121, Issue 8<br>
Message-ID:<br>
<<a href="mailto:CANz0eOy-CbKGwuaBBEKday6nmRPcKqYbi0feDpnQjg_gAdRpnA@mail.gmail.com">CANz0eOy-CbKGwuaBBEKday6nmRPcKqYbi0feDpnQjg_gAdRpnA@mail.gmail.com</a>><br>
Content-Type: text/plain; charset=UTF-8<br>
<br>
On Sat, Jul 20, 2013 at 11:50 PM, Blah900 <<a href="mailto:blah900z@gmail.com">blah900z@gmail.com</a>> wrote:<br>
> Sorry let me try to be more specific.<br>
><br>
> I am using Qt creator and copied the enet.lib and enet64.lib into my<br>
> workspace directory. Then I copied the include headers into my workspace<br>
> directory as well.<br>
><br>
> Then in the Qt Creator I tried both LIBS += -lenet64 and LIBS += -lenet to<br>
> link the library. Then I included into the project the enet headers. Then I<br>
> built it using Qmake and then tried to run it.<br>
<br>
Whether this works or not depends on which compiler you are using. It<br>
has to be compatible with the library you're trying to link. So are<br>
you using Visual Studio or MinGW?<br>
<br>
> However the error I get is the following:<br>
> LNK2019: unresolved external symbol enet_initialize referenced in<br>
> function....<br>
<br>
Is that the only error? Are there no reports about it not being able<br>
to link to enet, for example? To avoid this you can simply add the<br>
full path to the library to the LIBS variable, as follows:<br>
<br>
LIBS += path/to/zlib.lib (relative to your .pro file or make it absolute)<br>
<br>
> I think it linked in that if I ctrl+click the enet_initialize() I get moved<br>
> to the corresponding function inside the library.<br>
<br>
Whether you can Ctrl+click or not has nothing to do with the linking process.<br>
<br>
Finally, note that the enet license does not require you to use<br>
dynamic linking, so alternatively you can just include the enet<br>
sources into your project. That's what I did with my Qt project, which<br>
you could use as an example:<br>
<br>
<a href="https://github.com/mana/manamobile/blob/master/src/enet/enet.pri" target="_blank">https://github.com/mana/manamobile/blob/master/src/enet/enet.pri</a><br>
<br>
Regards,<br>
Bj?rn<br>
<br>
<br>
------------------------------<br>
<br>
_______________________________________________<br>
ENet-discuss mailing list<br>
<a href="mailto:ENet-discuss@cubik.org">ENet-discuss@cubik.org</a><br>
<a href="http://lists.cubik.org/mailman/listinfo/enet-discuss" target="_blank">http://lists.cubik.org/mailman/listinfo/enet-discuss</a><br>
<br>
<br>
End of ENet-discuss Digest, Vol 121, Issue 10<br>
*********************************************<br>
</blockquote></div><br></div>