[ENet-discuss] Linker Errors

Hibame hibame at gmail.com
Sun May 11 15:29:58 PDT 2008


I guess thats where I am having a problem then. In every other lib I
have included before I just added the path where the lib was located
to the project proprieties and it worked. Is there something extra
that must be done (besides the includes) to make the compiler link the
the enet.lib?

On Sun, May 11, 2008 at 2:57 PM, Marc Rochel <marc.rochel at udicom.de> wrote:
> Hi !
>
> You have to link with enet.lib . That's where those functions are defined.
>
>        Marc
>
>
> -----Ursprüngliche Nachricht-----
> Von: enet-discuss-bounces at cubik.org [mailto:enet-discuss-bounces at cubik.org] Im Auftrag von Hibame
> Gesendet: Sonntag, 11. Mai 2008 23:18
> An: enet-discuss at cubik.org
> Betreff: [ENet-discuss] Linker Errors
>
> I am a bit of a noob with visual studio so when I looked in the
> archives for the solution to the errors I was not quite clear as to
> what is needed to fix them so any help would be very much appreciated.
>
> This is the errors I am getting:
> 1>main.obj : error LNK2019: unresolved external symbol
> _enet_deinitialize referenced in function _main
> 1>main.obj : error LNK2019: unresolved external symbol
> _enet_initialize referenced in function _main
> 1>C:\test\Debug\client.exe : fatal error LNK1120: 2 unresolved externals
>
> The code is as follows:
> #include <winsock2.h>
> #include <string.h>
> #include <iostream>
> using namespace std;
>
> #include <enet.h>
>
> int main() {
>
>        if(enet_initialize() != 0)
>        {
>                fprintf(stderr, "An error occurred while initializing ENet.\n");
>                return EXIT_FAILURE;
>        }
>        atexit(enet_deinitialize);
>
>        return 0;
> }
> _______________________________________________
> ENet-discuss mailing list
> ENet-discuss at cubik.org
> http://lists.cubik.org/mailman/listinfo/enet-discuss
>
> _______________________________________________
> ENet-discuss mailing list
> ENet-discuss at cubik.org
> http://lists.cubik.org/mailman/listinfo/enet-discuss
>



More information about the ENet-discuss mailing list