Pages: [1]
|
|
|
Author
|
Topic: Compiling 6.2 on VSC++ (Read 10844 times)
|
DwD
Zebranky food
Offline
Gender:
Posts: 21
ancay ouyay eakspay igpay atinlay?
|
Let me start by saying, I am lousy wiht C++. That said, here's my problem. Compiling with VSC++, I am getting an error I don't know how to fix. Here's the error straight from the compiler;
D:\visual studio\vc08\VC\include\stdio.h(358) : error C3163: '_vsnprintf': attributes inconsistent with previous declaration D:\visual studio\vc08\VC\include\stdio.h(350) : see declaration of '_vsnprintf'
and the related lines of code;
_Check_return_opt_ _CRT_INSECURE_DEPRECATE(vsnprintf_s) _CRTIMP int __cdecl vsnprintf(_Out_cap_(_MaxCount) char * _DstBuf, _In_ size_t _MaxCount, _In_z_ _Printf_format_string_ const char * _Format, va_list _ArgList);
__DEFINE_CPP_OVERLOAD_STANDARD_NFUNC_0_2_ARGLIST_EX(int, __RETURN_POLICY_SAME, _CRTIMP, _snprintf, _vsnprintf, _Pre_notnull_ _Post_maybez_ char, _Out_cap_(_Count) _Post_maybez_, char, _Dest, _In_ size_t, _Count, _In_z_ _Printf_format_string_ const char *, _Format)
HELP!?
|
|
|
Logged
|
|
|
|
|
Poquito Mal
Zebranky food
Offline
Posts: 3
|
I had the same problem and got around it by commenting out the line:
#define vsnprintf _vsnprintf
in both port.h and uioport.h, but then I got some more errors:
Error 384 error LNK2019: unresolved external symbol _WspiapiFreeAddrInfo@4 referenced in function _ConnectState_close connect.obj UrQuanMasters
Error 385 error LNK2001: unresolved external symbol _WspiapiFreeAddrInfo@4 listen.obj UrQuanMasters
Error 386 error LNK2019: unresolved external symbol _WspiapiGetNameInfo@28 referenced in function _acceptSingleConnection listen.obj UrQuanMasters
Error 387 error LNK2019: unresolved external symbol _WspiapiGetAddrInfo@16 referenced in function _getaddrinfoAsync resolve.obj UrQuanMasters
Error 388 fatal error LNK1120: 3 unresolved externals c:\Build\sc2\uqmdebug.exe UrQuanMasters
Haven't had the energy to fight with it since... Just tried again commenting out all the lines you mentioned and still get the same errors as well as several:
error LNK2001: unresolved external symbol _snprintf
errors and one:
Error 375 error LNK2019: unresolved external symbol _snprintf referenced in function _starPresenceString uqmdebug.obj UrQuanMasters
|
|
|
Logged
|
|
|
|
DwD
Zebranky food
Offline
Gender:
Posts: 21
ancay ouyay eakspay igpay atinlay?
|
I commented the lines you suggested with similar results to Poquito Mal. If i comment only the vsnprintf definition, I get 4 errors.
1>connect.obj : error LNK2019: unresolved external symbol _WspiapiFreeAddrInfo@4 referenced in function _ConnectState_close 1>listen.obj : error LNK2001: unresolved external symbol _WspiapiFreeAddrInfo@4 1>listen.obj : error LNK2019: unresolved external symbol _WspiapiGetNameInfo@28 referenced in function _acceptSingleConnection 1>resolve.obj : error LNK2019: unresolved external symbol _WspiapiGetAddrInfo@16 referenced in function _getaddrinfoAsync
BTW I want to express my gratitude to those of you who updated this excellent old game and added the network support for melee.
|
|
« Last Edit: December 11, 2008, 03:33:20 pm by DwD »
|
Logged
|
|
|
|
meep-eep
Forum Admin
Enlightened
Offline
Posts: 2847
|
Could you try editing src/sc2code/libs/network/wspiapiwrap.h, replacing the section:
// HACK. See wspiapiwrap.c # define getaddrinfo WspiapiGetAddrInfo # define getnameinfo WspiapiGetNameInfo # define freeaddrinfo WspiapiFreeAddrInfo void WINAPI WspiapiFreeAddrInfo (struct addrinfo *ai); int WINAPI WspiapiGetAddrInfo(const char *nodename, const char *servname, const struct addrinfo *hints, struct addrinfo **res); int WINAPI WspiapiGetNameInfo (const struct sockaddr *sa, socklen_t salen, char *host, size_t hostlen, char *serv, size_t servlen, int flags); by
#include <wspiapi.h>
|
|
|
Logged
|
“When Juffo-Wup is complete when at last there is no Void, no Non when the Creators return then we can finally rest.”
|
|
|
DwD
Zebranky food
Offline
Gender:
Posts: 21
ancay ouyay eakspay igpay atinlay?
|
I commented the line
#define vsnprintf _vsnprintf
in port.h and made the changes you suggested. I got a compile.
It's late here and I have no one to test the networking with right now. I'll try it tomorrow and let you know.
Thanks!
EDIT
I have still not tested the networking, but I have found a strange bug with this compile. In the storyline, when the Precursor vessel enters hyperspace, on auto-pilot, it will travel for a few seconds then stops with the menu active, like the computer has registered a keystroke. I can select navigate and the ship will continue on course for a few seconds more then stops again with the menu active. This continues in a loop.
I have checked this against the original uqm.exe and it is not my keyboard sticking.
EDIT
I have checked the melee network, it works. For now, I can use 6.2 for network melee with my edited ships and 5.0 for the game with my edited ships.
|
|
« Last Edit: December 13, 2008, 08:19:12 pm by DwD »
|
Logged
|
|
|
|
Wisp
Zebranky food
Offline
Posts: 1
|
I know there has been time since the last post, but anyway I thought about sharing my solution. I just compiled uqm 0.6.2 on msvc++ 9.0. To work around the stdio.h that is giving errors, I simply used an older stdio.h and all compiled perfectly.
|
|
|
Logged
|
|
|
|
DukHunter
Zebranky food
Offline
Posts: 3
|
Trying to compile under MS VS 2008 and got lot of linker errors (below). It's crazy. When I tried it before I didn't get so many problems. How to exclude Network part from compilation??
"Creating library ../../uqmdebug.lib and object ../../uqmdebug.exp 1>connect.obj : error LNK2019: unresolved external symbol _WspiapiFreeAddrInfo@4 referenced in function _ConnectState_close 1>listen.obj : error LNK2001: unresolved external symbol _WspiapiFreeAddrInfo@4 1>listen.obj : error LNK2019: unresolved external symbol _WspiapiGetNameInfo@28 referenced in function _acceptSingleConnection 1>resolve.obj : error LNK2019: unresolved external symbol _WspiapiGetAddrInfo@16 referenced in function _getaddrinfoAsync 1>netmanager_win.obj : error LNK2019: unresolved external symbol __imp__WSAGetLastError@0 referenced in function _closeWSAEvent 1>netport.obj : error LNK2001: unresolved external symbol __imp__WSAGetLastError@0 1>netmanager_win.obj : error LNK2019: unresolved external symbol __imp__WSACloseEvent@4 referenced in function _closeWSAEvent 1>netmanager_win.obj : error LNK2019: unresolved external symbol __imp__WSAEventSelect@12 referenced in function _NetManager_addDesc 1>netmanager_win.obj : error LNK2019: unresolved external symbol __imp__WSACreateEvent@0 referenced in function _NetManager_addDesc 1>netmanager_win.obj : error LNK2019: unresolved external symbol __imp__WSAWaitForMultipleEvents@20 referenced in function _NetManager_process 1>netmanager_win.obj : error LNK2019: unresolved external symbol __imp__WSAEnumNetworkEvents@12 referenced in function _NetManager_processEvent 1>socket_win.obj : error LNK2019: unresolved external symbol __imp__socket@12 referenced in function _Socket_openNative 1>socket_win.obj : error LNK2019: unresolved external symbol __imp__closesocket@4 referenced in function _Socket_close 1>socket_win.obj : error LNK2019: unresolved external symbol __imp__connect@12 referenced in function _Socket_connect 1>socket_win.obj : error LNK2019: unresolved external symbol __imp__bind@12 referenced in function _Socket_bind 1>socket_win.obj : error LNK2019: unresolved external symbol __imp__listen@8 referenced in function _Socket_listen 1>socket_win.obj : error LNK2019: unresolved external symbol __imp__accept@12 referenced in function _Socket_accept 1>socket_win.obj : error LNK2019: unresolved external symbol __imp__send@16 referenced in function _Socket_send 1>socket_win.obj : error LNK2019: unresolved external symbol __imp__recv@16 referenced in function _Socket_recv 1>socket_win.obj : error LNK2019: unresolved external symbol __imp__ioctlsocket@12 referenced in function _Socket_setNonBlocking 1>socket_win.obj : error LNK2019: unresolved external symbol __imp__setsockopt@20 referenced in function _Socket_setReuseAddr 1>socket_win.obj : error LNK2019: unresolved external symbol __imp__getsockopt@20 referenced in function _Socket_getError 1>network_win.obj : error LNK2019: unresolved external symbol __imp__WSACleanup@0 referenced in function _Network_init 1>network_win.obj : error LNK2019: unresolved external symbol __imp__WSAStartup@8 referenced in function _Network_init"
|
|
|
Logged
|
|
|
|
|
Pages: [1]
|
|
|
|
|