[ENet-discuss] Err, Enet won't build due to linker/compiler errors.

Matt Amidon matthewcafl at yahoo.com
Mon Jul 28 13:15:18 PDT 2008


Alrighty, so I download the 1.2 release unpack it and convert it to my VStudio version-- all is well.
I just add one source file (main.cpp) and change the project type from static library to executable and build.
I get the following errors:

[errors]
>------ Build started: Project: enet, Configuration: Debug Win32 ------
1>Compiling...
1>win32.c
1>Linking...
1>callbacks.obj : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/OPT:ICF' specification
1>callbacks.obj : error LNK2019: unresolved external symbol _enet_initialize referenced in function _enet_initialize_with_callbacks
1>host.obj : error LNK2019: unresolved external symbol _enet_socket_set_option referenced in function _enet_host_create
1>host.obj : error LNK2019: unresolved external symbol _enet_socket_create referenced in function _enet_host_create
1>host.obj : error LNK2019: unresolved external symbol _enet_socket_destroy referenced in function _enet_host_destroy
1>host.obj : error LNK2019: unresolved external symbol _enet_time_get referenced in function _enet_host_bandwidth_throttle
1>protocol.obj : error LNK2001: unresolved external symbol _enet_time_get
1>protocol.obj : error LNK2019: unresolved external symbol _enet_socket_send referenced in function _enet_protocol_send_outgoing_commands
1>protocol.obj : error LNK2019: unresolved external symbol _enet_socket_wait referenced in function _enet_host_service
1>protocol.obj : error LNK2019: unresolved external symbol _enet_socket_receive referenced in function _enet_protocol_receive_incoming_commands
1>.\Debug\enet.exe : fatal error LNK1120: 8 unresolved externals
1>Creating browse information file...
1>Microsoft Browse Information Maintenance Utility Version 8.00.50727
1>Copyright (C) Microsoft Corporation. All rights reserved.
1>Build log was saved at "file://c:\Users\Matthew\Documents\Visual Studio 2005\Projects\enet-1.2\Debug\BuildLog.htm"
1>enet - 10 error(s), 1 warning(s)
[/errors]

Righto, so I look at the actual definition and insert a #define WIN32 in win32.c (the definition was greyed out for somereason) then I compile again
Now, I only get these errors.

[errors]
1>------ Build started: Project: enet, Configuration: Debug Win32 ------
1>Compiling...
1>win32.c
1>c:\include\time_calls.h(71) : error C2148: total size of array must not exceed 0x7fffffff bytes
1>c:\include\time_calls.h(71) : error C2079: 'start' uses undefined struct 'timeval'
1>c:\include\time_calls.h(474) : error C2036: 'timeval *' : unknown size
1>c:\include\time_calls.h(479) : error C2036: 'timeval *' : unknown size
1>c:\program files\microsoft visual studio 8\vc\include\sys\time.h(126) : error C2079: 'last_read' uses undefined struct 'timeval'
1>c:\program files\microsoft visual studio 8\vc\include\sys\time.h(154) : error C2037: left of 'tv_sec' specifies undefined struct/union 'timeval'
1>c:\program files\microsoft visual studio 8\vc\include\sys\time.h(154) : error C2224: left of '.tv_sec' must have struct/union type
1>c:\users\matthew\documents\visual studio 2005\projects\enet-1.2\win32.c(31) : warning C4013: 'timeBeginPeriod' undefined; assuming extern returning int
1>c:\users\matthew\documents\visual studio 2005\projects\enet-1.2\win32.c(39) : warning C4013: 'timeEndPeriod' undefined; assuming extern returning int
1>c:\users\matthew\documents\visual studio 2005\projects\enet-1.2\win32.c(47) : warning C4013: 'timeGetTime' undefined; assuming extern returning int
1>Creating browse information file...
1>Microsoft Browse Information Maintenance Utility Version 8.00.50727
1>Copyright (C) Microsoft Corporation. All rights reserved.
1>Build log was saved at "file://c:\Users\Matthew\Documents\Visual Studio 2005\Projects\enet-1.2\Debug\BuildLog.htm"
1>enet - 7 error(s), 3 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
[/errors]

The ONLY code I have written is :
#include "enet.h"

int main( int argc, char* argv[] )
{
    return 1; 
}

I am also linking ws2_32.lib and have defined WIN32_LEAN_AND_MEAN



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cubik.org/pipermail/enet-discuss/attachments/20080728/b34c3459/attachment.htm>


More information about the ENet-discuss mailing list