Posting in the right spot, I hope..
by Morgan Hein · in Torque Game Engine · 03/06/2004 (8:58 pm) · 7 replies
Hello everyone.
I just recently bought the Torque Engine, hoping to get it to work with Python. I've been diligently reading up on game programming, python programming, python game programming, etc etc, for quite some time now, and though it was time to jump in.
I'm glad i'm finally here ;)
I hope it's okay to go straight into a question. I downloaded the latest stable release from the CVS, compile, and get an error like this:
It compiled just fine and ran even, but then when I tried changing things to support TGEPython, it now stops with the last errors.
Any help would be appreciated.
Considering I am more a Python programmer then anything low-level, I can tell i'll have lots of trouble playing with the engine itself. Hopefully i'll find a friend to work alongside and deal with that headache!
Thanks in advance
~JohnnyFive
I just recently bought the Torque Engine, hoping to get it to work with Python. I've been diligently reading up on game programming, python programming, python game programming, etc etc, for quite some time now, and though it was time to jump in.
I'm glad i'm finally here ;)
I hope it's okay to go straight into a question. I downloaded the latest stable release from the CVS, compile, and get an error like this:
--------------------Configuration: Torque Demo - Win32 Debug-------------------- Linking... MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _exit already defined in LIBCMT.lib(crt0dat .obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _fprintf already defined in LIBCMT.lib(fpri ntf.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _sprintf already defined in LIBCMT.lib(spri ntf.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _sscanf already defined in LIBCMT.lib(sscan f.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _getenv already defined in LIBCMT.lib(geten v.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _malloc already defined in LIBCMT.lib(mallo c.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _free already defined in LIBCMT.lib(free.ob j) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _gmtime already defined in LIBCMT.lib(gmtim e.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _fflush already defined in LIBCMT.lib(fflus h.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _calloc already defined in LIBCMT.lib(callo c.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _strtod already defined in LIBCMT.lib(strto d.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _strncmp already defined in LIBCMT.lib(strn cmp.obj) MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _realloc already defined in LIBCMT.lib(real loc.obj) LINK : warning LNK4098: defaultlib "MSVCRTD" conflicts with use of other libs; use /N ODEFAULTLIB:library ../example/torqueDemo_DEBUG.exe : fatal error LNK1169: one or more multiply defined s ymbols found Error executing link.exe. torqueDemo_DEBUG.exe - 14 error(s), 1 warning(s)
It compiled just fine and ran even, but then when I tried changing things to support TGEPython, it now stops with the last errors.
Any help would be appreciated.
Considering I am more a Python programmer then anything low-level, I can tell i'll have lots of trouble playing with the engine itself. Hopefully i'll find a friend to work alongside and deal with that headache!
Thanks in advance
~JohnnyFive
#2
03/08/2004 (3:35 pm)
Can someone be a bit more specific? I really am having trouble with this whole C++ business. Is there a tutorial that would help me along these lines? I can't even figure out where the libraries are...
#3
http://www.garagegames.com/docs/torque.sdk/gstarted/compilers.win32.vc6.html
At a VERY QUICK glance it looks like you might be having a single/multi thread conflict, though that shouldn't be happening. Follow all the instructions listed in the link I posted. If it still doesn't work, please post which compiler you are using.
03/08/2004 (4:33 pm)
First off, please specify what platofrm and compiler. Assuming you are on windows, make sure youve read and followed the compile instructions here:http://www.garagegames.com/docs/torque.sdk/gstarted/compilers.win32.vc6.html
At a VERY QUICK glance it looks like you might be having a single/multi thread conflict, though that shouldn't be happening. Follow all the instructions listed in the link I posted. If it still doesn't work, please post which compiler you are using.
#4
I'm using the Visual Studio 6, w/o .net. Because i'm integrating TGEPython, it told me to change several of the files to MultiThreaded DLL's, and I doublechecked to make sure I did it to all the right ones.
I've also compiled using that link you sent, and it worked fine. If there isn't an obvious answer, just tell me to shutup and i'll dig into a hole till I figure it out :P
Thanks in advance!
03/09/2004 (2:50 pm)
Thank you for being so patient with me.I'm using the Visual Studio 6, w/o .net. Because i'm integrating TGEPython, it told me to change several of the files to MultiThreaded DLL's, and I doublechecked to make sure I did it to all the right ones.
I've also compiled using that link you sent, and it worked fine. If there isn't an obvious answer, just tell me to shutup and i'll dig into a hole till I figure it out :P
Thanks in advance!
#5
Python rocks and Torque rocks, so it is understandable that many people want to make them play nice together.
I haven't had time to research this topic in detail myself yet, so I can't help with the *specific* problem you're having. However, I can point you to a couple resources and folks that have worked on Python + Torque stuff already. If you haven't seen these resources already, they should be helpful.
Check out:
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=4039
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=2821
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=2507
You might consider directly contacting the people listed above as well. They could have very specific knowledge of problems you encounter, and would probably appreciate talking with someone who is interested in such projects.
Besides that, just the usual forum and resource searching should be helpful. I know there have been at least a few forum threads on Pythoning with Torque.
Again, welcome to the community :) Sorry I couldn't offer any specific advice, but I hope this helps a little bit.
03/10/2004 (2:49 pm)
Welcome, Morgan :)Python rocks and Torque rocks, so it is understandable that many people want to make them play nice together.
I haven't had time to research this topic in detail myself yet, so I can't help with the *specific* problem you're having. However, I can point you to a couple resources and folks that have worked on Python + Torque stuff already. If you haven't seen these resources already, they should be helpful.
Check out:
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=4039
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=2821
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=2507
You might consider directly contacting the people listed above as well. They could have very specific knowledge of problems you encounter, and would probably appreciate talking with someone who is interested in such projects.
Besides that, just the usual forum and resource searching should be helpful. I know there have been at least a few forum threads on Pythoning with Torque.
Again, welcome to the community :) Sorry I couldn't offer any specific advice, but I hope this helps a little bit.
#6
The problem is because some libraries you are using were built to use a different runtime library. Go into the project settings for each project and check that the runtime library is the same for each. I think it's under the Link tab.
If you're linking with libraries you've downloaded from the net (e.g. python?) you may need to get different ones.
This could also be as simple as using a release library in a debug build or a debug library in a release build.
Using /nodefaultlib might also work, however it is generally better to fix it by getting the libraries right else you can run into problems with memory leaks and stuff.
Hope that helps,
Tom.
03/10/2004 (3:04 pm)
Howdy,The problem is because some libraries you are using were built to use a different runtime library. Go into the project settings for each project and check that the runtime library is the same for each. I think it's under the Link tab.
If you're linking with libraries you've downloaded from the net (e.g. python?) you may need to get different ones.
This could also be as simple as using a release library in a debug build or a debug library in a release build.
Using /nodefaultlib might also work, however it is generally better to fix it by getting the libraries right else you can run into problems with memory leaks and stuff.
Hope that helps,
Tom.
#7
Make sure you understand and can work through all of the standard C++ and TorqueScript examples. If you can do that, then you can take on Python. It is going to be very difficult for the community to help you if you are floundering.
-Jeff Tunnell GG
03/10/2004 (6:57 pm)
Like I have told other people in a similar position. Work all of the kinks out of standard Torque before you attempt Python. Unless you are an accomplished C++ programmer, it is probably not in your best interests to try to work through too many things at once.Make sure you understand and can work through all of the standard C++ and TorqueScript examples. If you can do that, then you can take on Python. It is going to be very difficult for the community to help you if you are floundering.
-Jeff Tunnell GG
Torque Owner Dee
>>defaultlib "MSVCRTD" conflicts with use of other libs; use /NODEFAULTLIB:library
Because of these:
>>_xxxxx already defined in LIBCMT.lib
That means you are attempting to use two libraries that define the same function/routine.
In addition, ensure you do a 'clean', then re-compile when adding new libs.