[ENet-discuss] Newbie error - VC++6

Paul Collier paching at gmail.com
Tue May 23 07:33:32 PDT 2006


Hello,

Yeah, you have to link against the enet library in order to use it. You
should probably go read up about this sort of thing, you'll likely have to
do it again ;D That -lenet line doesn't apply to VC++, that's GCC
command-line style. For VC++, you'll probably have to go into your Project
Settings in the Linker section and add enet.lib to the list of libraries
that the project needs.

Hope this helps,
- Paul

On 5/23/06, Matija Runkas <matija.runkas at zg.t-com.hr> wrote:
>
>  Hi,
>
> Im a newb in C++ waters so i need some quick help.
> Been doing some things in VC++ 6 and it worked nicely, with alot of pain
> of course :-)
> Anyway while working on network FPS game using, well one game engine (dont
> want advertise here) I found it is cripling me
> since I am able to create games for only 4 players and its perfromance is
> not what I expected. In order to learn more and make
> this "thing" work properly I ventured into creating network dll as this
> engine supports use of such things.
> I tried RakNet and did some basic stuff with it unfortunaly they changed
> their licencing and i dont have $$ to buy it.
> So i found Enet, look like very much what I need.
>
> Unfortunaly im a VC newb so I cant get it to work.
>
> I follwed brief instructions on how to get it into my project and I have
> read trough threads on disscusion board named
> "Initialization" and havent found solution.
> I have included only:
>
> *#include "enet\enet.h"*
>
> and added functions that are suposed to only initialize and deinitialize
> Enet:
>
> *#define DLL_USE
> #include "adll.h"*
> **
> **
> **
> *//#include "win32.h"*
> **
> *BOOL APIENTRY DllMain( HANDLE hModule,
>                        DWORD  ul_reason_for_call,
>                        LPVOID lpReserved
>       )
> {
>  engine_bind();
>     return TRUE;
> }*
>
> *DLLFUNC var DllInitNet(void) //main (int argc, char ** argv)
> {
>     if (enet_initialize () !>     {
>         //fprintf (stderr, "An error occurred while initializing
> ENet.\n");
>         return _VAR(1);//return EXIT_FAILURE;
>     }
>     atexit (enet_deinitialize);
>  return _VAR(0);
> }*
> **
> Compiling spits this out and i cant get rid of it:
>
> *test1.obj : error LNK2001: unresolved external symbol _enet_deinitialize
> test1.obj : error LNK2001: unresolved external symbol _enet_initialize
> Debug/test1.dll : fatal error LNK1120: 2 unresolved externals
> Error executing link.exe.*
>
>
> In other "similar" threads people said "put -lenet" somewhere, but I dont
> know where to put that, if that would solve it?
>
> Matija
>
> _______________________________________________
> ENet-discuss mailing list
> ENet-discuss at cubik.org
> http://lists.cubik.org/mailman/listinfo/enet-discuss
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cubik.org/pipermail/enet-discuss/attachments/20060523/ca646d00/attachment.htm 


More information about the ENet-discuss mailing list