Problem with TNL Hello World
by Mogley Gadjo · in Torque Game Engine · 06/09/2010 (10:50 am) · 3 replies
I'm on Visual Studio 2008 and am going through the tutorial posted here: :
---http://opentnl.sourceforge.net/doxydocs/simpletutorial.html
and it gives me 32 unresolved externals when I get to this line:
---TNL_IMPLEMENT_NETCONNECTION(SimpleEventConnection, NetClassGroupGame, true);
The output I get is this:
LIBCMTD.lib(invarg.obj) : error LNK2005: __invoke_watson already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(setlocal.obj) : error LNK2005: __configthreadlocale already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(tidtable.obj) : error LNK2005: __encode_pointer already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(tidtable.obj) : error LNK2005: __decode_pointer already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(dbgheap.obj) : error LNK2005: __CrtSetCheckCount already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(crt0dat.obj) : error LNK2005: _exit already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(crt0dat.obj) : error LNK2005: __exit already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(crt0dat.obj) : error LNK2005: __cexit already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(crt0dat.obj) : error LNK2005: __amsg_exit already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(crt0dat.obj) : error LNK2005: __initterm_e already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(mlock.obj) : error LNK2005: __lock already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(mlock.obj) : error LNK2005: __unlock already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(winxfltr.obj) : error LNK2005: __XcptFilter already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(dbghook.obj) : error LNK2005: __crt_debugger_hook already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(crt0init.obj) : error LNK2005: ___xi_a already defined in MSVCRTD.lib(cinitexe.obj)
LIBCMTD.lib(crt0init.obj) : error LNK2005: ___xi_z already defined in MSVCRTD.lib(cinitexe.obj)
LIBCMTD.lib(crt0init.obj) : error LNK2005: ___xc_a already defined in MSVCRTD.lib(cinitexe.obj)
LIBCMTD.lib(crt0init.obj) : error LNK2005: ___xc_z already defined in MSVCRTD.lib(cinitexe.obj)
LIBCMTD.lib(hooks.obj) : error LNK2005: "void __cdecl terminate(void)" (?terminate@@YAXXZ) already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(winsig.obj) : error LNK2005: _raise already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(atox.obj) : error LNK2005: _atoi already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(crt0.obj) : error LNK2005: _mainCRTStartup already defined in MSVCRTD.lib(crtexe.obj)
LIBCMTD.lib(errmode.obj) : error LNK2005: ___set_app_type already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(dbgrptw.obj) : error LNK2005: __CrtDbgReportW already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(_file.obj) : error LNK2005: ___iob_func already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(fflush.obj) : error LNK2005: _fflush already defined in MSVCRTD.lib(MSVCR90D.dll)
MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: __strdup already defined in LIBCMTD.lib(strdup.obj)
LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library
LINK : warning LNK4098: defaultlib 'LIBCMTD' conflicts with use of other libs; use /NODEFAULTLIB:library
simpleNet.obj : error LNK2001: unresolved external symbol "public: virtual class TNL::NetEvent * __thiscall SimpleEventConnection::rpcMessageClientToServer_construct(char const *)" (?rpcMessageClientToServer_construct@SimpleEventConnection@@UAEPAVNetEvent@TNL@@PBD@Z)
simpleNet.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall SimpleEventConnection::rpcMessageClientToServer_remote(char const *)" (?rpcMessageClientToServer_remote@SimpleEventConnection@@UAEXPBD@Z)
simpleNet.obj : error LNK2001: unresolved external symbol "public: virtual class TNL::NetEvent * __thiscall SimpleEventConnection::rpcMessageServerToClient_construct(char const *)" (?rpcMessageServerToClient_construct@SimpleEventConnection@@UAEPAVNetEvent@TNL@@PBD@Z)
simpleNet.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall SimpleEventConnection::rpcMessageServerToClient_remote(char const *)" (?rpcMessageServerToClient_remote@SimpleEventConnection@@UAEXPBD@Z)
I have added wsock32.lib, tnld.lib and libtomcryptd.lib as additional dependencies in properties. And the whole thing compiles before that one line.
Any help would be greatly appreciated, Thanks guys.
---http://opentnl.sourceforge.net/doxydocs/simpletutorial.html
and it gives me 32 unresolved externals when I get to this line:
---TNL_IMPLEMENT_NETCONNECTION(SimpleEventConnection, NetClassGroupGame, true);
The output I get is this:
LIBCMTD.lib(invarg.obj) : error LNK2005: __invoke_watson already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(setlocal.obj) : error LNK2005: __configthreadlocale already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(tidtable.obj) : error LNK2005: __encode_pointer already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(tidtable.obj) : error LNK2005: __decode_pointer already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(dbgheap.obj) : error LNK2005: __CrtSetCheckCount already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(crt0dat.obj) : error LNK2005: _exit already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(crt0dat.obj) : error LNK2005: __exit already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(crt0dat.obj) : error LNK2005: __cexit already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(crt0dat.obj) : error LNK2005: __amsg_exit already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(crt0dat.obj) : error LNK2005: __initterm_e already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(mlock.obj) : error LNK2005: __lock already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(mlock.obj) : error LNK2005: __unlock already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(winxfltr.obj) : error LNK2005: __XcptFilter already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(dbghook.obj) : error LNK2005: __crt_debugger_hook already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(crt0init.obj) : error LNK2005: ___xi_a already defined in MSVCRTD.lib(cinitexe.obj)
LIBCMTD.lib(crt0init.obj) : error LNK2005: ___xi_z already defined in MSVCRTD.lib(cinitexe.obj)
LIBCMTD.lib(crt0init.obj) : error LNK2005: ___xc_a already defined in MSVCRTD.lib(cinitexe.obj)
LIBCMTD.lib(crt0init.obj) : error LNK2005: ___xc_z already defined in MSVCRTD.lib(cinitexe.obj)
LIBCMTD.lib(hooks.obj) : error LNK2005: "void __cdecl terminate(void)" (?terminate@@YAXXZ) already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(winsig.obj) : error LNK2005: _raise already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(atox.obj) : error LNK2005: _atoi already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(crt0.obj) : error LNK2005: _mainCRTStartup already defined in MSVCRTD.lib(crtexe.obj)
LIBCMTD.lib(errmode.obj) : error LNK2005: ___set_app_type already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(dbgrptw.obj) : error LNK2005: __CrtDbgReportW already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(_file.obj) : error LNK2005: ___iob_func already defined in MSVCRTD.lib(MSVCR90D.dll)
LIBCMTD.lib(fflush.obj) : error LNK2005: _fflush already defined in MSVCRTD.lib(MSVCR90D.dll)
MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: __strdup already defined in LIBCMTD.lib(strdup.obj)
LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library
LINK : warning LNK4098: defaultlib 'LIBCMTD' conflicts with use of other libs; use /NODEFAULTLIB:library
simpleNet.obj : error LNK2001: unresolved external symbol "public: virtual class TNL::NetEvent * __thiscall SimpleEventConnection::rpcMessageClientToServer_construct(char const *)" (?rpcMessageClientToServer_construct@SimpleEventConnection@@UAEPAVNetEvent@TNL@@PBD@Z)
simpleNet.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall SimpleEventConnection::rpcMessageClientToServer_remote(char const *)" (?rpcMessageClientToServer_remote@SimpleEventConnection@@UAEXPBD@Z)
simpleNet.obj : error LNK2001: unresolved external symbol "public: virtual class TNL::NetEvent * __thiscall SimpleEventConnection::rpcMessageServerToClient_construct(char const *)" (?rpcMessageServerToClient_construct@SimpleEventConnection@@UAEPAVNetEvent@TNL@@PBD@Z)
simpleNet.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall SimpleEventConnection::rpcMessageServerToClient_remote(char const *)" (?rpcMessageServerToClient_remote@SimpleEventConnection@@UAEXPBD@Z)
I have added wsock32.lib, tnld.lib and libtomcryptd.lib as additional dependencies in properties. And the whole thing compiles before that one line.
Any help would be greatly appreciated, Thanks guys.
#2
@Mogley:
If I recall, you need to tell VS to ignore the LIBCMTD library. It's being brought in by one of the other libraries, so that's why you're getting the already defined messages.
@David:
Sweet! I didn't know there was a TNL2 available.
- Dave
06/11/2010 (8:23 am)
Greetings!@Mogley:
If I recall, you need to tell VS to ignore the LIBCMTD library. It's being brought in by one of the other libraries, so that's why you're getting the already defined messages.
@David:
Sweet! I didn't know there was a TNL2 available.
- Dave
#3
06/12/2010 (12:09 pm)
I tried telling VS to ignore LIBCMTD and it only gave me 5 errors this time. I'll admit thats all I tried. I started playing around with Zoidcom to get a feel for what it is capable of. So far it has been successful. If and when I come back to TNL, I will definitely try out TNL2. Thanks guys for your help.
Associate David Montgomery-Blake
David MontgomeryBlake
http://github.com/nardo/tnl2
Try compiling from there. I know that there were a number of outdated references in the old source base, but it sounds like you have cleaned up most of them.