Game Development Community

Can't Solve Linking Errors

by Steven Peterson · in Technical Issues · 02/09/2006 (9:23 am) · 5 replies

My first 1/2 dozen classes compile with no errors when i individually click on the .cc files and hit compile. But when I click 'Build Torque Demo.exe" (in MS-VC6) I'm getting some strange linking errors. Unlike a compile error that points to a deffinitive problem, I don't know how to go about solving a linking error.

I did some googling this time around, and Microsoft suggets a few 'workarounds' but i'm not sure they were real solutions. Either way they didn't work.

The "taskManager.obj" it reffers to doesn't include anything I didn't write except for "console/simBase.h" and in another included class (not a subclass though) i'm including and .

Any ideas whats causing this problem?

--------------------Configuration: Torque Demo - Win32 Release--------------------
Linking...
winMemory.obj : error LNK2005: "void * __cdecl operator new(unsigned int,void *)" (??2@YAPAXIPAX@Z) already defined in taskManager.obj
../example/torqueDemo.exe : fatal error LNK1169: one or more multiply defined symbols found
Error executing link.exe.

torqueDemo.exe - 2 error(s), 0 warning(s)

Thanks again,
Raven

#1
02/09/2006 (11:24 pm)
You are most likely trying to use STL classes. This is not possible with stock TGE/TSE, as it has its own memory manager (and thus already has a new() class defined)

You either need to not use STL, or implement the STL fix.

http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=7480
#2
02/10/2006 (12:05 pm)
Thanks, thats evetually what I figured out sometime last night. I had to use the and classes instead and it seems ok now.

Is there any documentation covering all of the "STL-like" classes that are already reimplemented in torque and maybe comparing them to the STL? I didn't find one, but it seems like a good thing to know about. If not it'd be a good cannidate for a wikki-article.

Thanks for the help, I'll check out that resource.

Raven
#3
02/24/2006 (11:47 am)
*bump*
#4
02/24/2006 (12:12 pm)
Well, two things:

VC6 isn't supported any longer.

This is a source code related issue, and can't be discussed in a private forum :(
#5
02/27/2006 (12:31 pm)
Lol, thanks.