Game Development Community

Strange bug with frameAllocator.cc when compiling Torque Lib

by David Dougher · in Torque Game Engine · 06/29/2005 (8:16 am) · 6 replies

Ran into this rather odd bug when I got a new copy of torque from CVS. I just updated a system to XP and was going through all the setup and when I went to compile (VC7) I got an error that frameAllocator.cc could not be found in the library compile only. I checked the Demo side of things and it was all fine, checked the core subdirectory and it was there. Double clicked on frame Allocator on the torque demo side and it loaded no problem - tried the same thing on the Library side and it could not find the file.

So I deleted the references to frameAllocator.cc and h from core on the library side and then re-added them and everything was ok.

I repeated this with another fresh download from CVS. Anybody else seeing this minor glitch? Could the frameAllocator.cc and h reference in the Torque Library be placed in the /core subdirectory but point to its old home in /sim ??

About the author

Owner - Pariah Games, Adjunct Professor - Bristol Community College, Mentor - Game Design - Met School Newport, Mentor - Game Design - Met School Providence


#1
06/30/2005 (5:13 pm)
Ah Ha! I looked at a nother thread about this could you be mor specific on how you fixed this. i dont really like messing to much in the compiler with out step by steps thanx
#2
06/30/2005 (8:56 pm)
Sure the fix is amazingly simple, but I will go through it very carefully..

1. Start up VC7. and load the torque project file (The simple way is doing a left mouse button double click on the file \torque\VC7\Torque SDK.sln)

2. When the project has loaded, look on the right side of the screen at the Solution 'Torque SDK' (16 projects) list. The second from the bottom should be Torque Lib - expand it by clicking on the plus sign.

3. Next, expand the Source Files by clicking on the plus sign.

4. Finally, expand the core subdirectory by clicking on the plus sign.

5. Look down the list and you should see the frameAllocator.cc and frameAllocator.h file - Ctrl left mouse click on each of them with the mouse to highlight them both. Then hit the delete key. They should be immediately deleted from the compile list (the real files are not deleted they are just removed form the list of files to compile).

(Note: Sometimes the system will oddly offer to delete the whole Torque Library - if you see a dialog box asking if you should delete Torque Lib - Cancel - then try highlighting the files again. I've only seen this happen one time but I wouldn't want anybody to wipe out the whole library compile! )

After you have deleted the two files successfully, you now need to add them back - this time making sure that they are coming from the correct location.

6. To do that, go up to the open yellow file folder that says "core" and right click on it with the mouse. You will see a pull down dialog box. The first entry, "Add" leads to a second pull down - select "Add Existing Item..."

7. At this point, you will get a standard windows box for locating a file. You need to navigate out of the VC7 subdirectory to torque/engine/core. Once there you will see the two files frameAllocator.cc and frameAllocator.h Ctrl left mouse click on both of them and they should be highlighted. Then click on Open and they will be correctly added to the core project subdirectory. (They will appear at the bottom of the core list. )

At this point you should save the project and then do a Batch/Build/Rebuild All to make sure the files were properly found and the project compiles correctly..

(Sorry if a went a bit heavy on the handholding in describing how to do this but not everyone may be familiar with the process for adding files and if someone comes looking for the answer later I want to make sure I don't create any confusion.)

Of course, the other solution is for GG to do the same thing, save the settings and then check in to CVS, which will hopefully fix the problem permanently for everyone...
#3
06/30/2005 (9:20 pm)
I see what you mean now! so basicly you just delete and readd them to the project, what i did was copied them and just threw them back into the sim folder to lose the errors , (not even adding them to the project weird)

your way makes much more sence, all is good now, thanks
#4
07/01/2005 (5:59 am)
Correct, just delete and re-add.

Moving a copy of the files to the sim folder (its old location) will cause a lot more problems than it will cure... There are other references to the frameAllocater.h in other files thoughout the game and copying or moving the files means either the other pointers will be wrong - causing a bunch of errors, or you have two copies of the same files trying to be compiled from different locations - a sure recipe for lots of error messages...
#5
07/01/2005 (1:57 pm)
Heh , cool im sure glad there are ppl smarter then me;)
#6
07/10/2005 (5:15 pm)
To expand on David's solution:

This issue affects the current CVS HEAD, which is v1.4 RC1 at the moment.

Somebody messed up the .vcproj file when they moved frameallocator.* The relative path was incorrectly specified as ..\..\torque\engine\core, which assumes that you installed your source into a top-level directory named "torque", which is unlikely if you are using CVS.

You can do the remove and readd procedure above, or you can edit the Torque Lib.vcproj file directly with notepad or something and change the frameallocator relative paths to match the other source files. Or, you can make sure the parent of the "engine" folder is named "torque".

--- Kevin