Game Development Community

Build issues

by Mario N. Bonassin · in · 01/06/2005 (11:15 am) · 9 replies

I just did the merge of the lighting pack with the core. I went to do a build in vc6 and got the following warnings and errors


C:\Torque\SDK\engine\interior\pathedInterior.cc(143) : warning C4700: local variable 'pathPos' used without having been initialized
C:\Torque\SDK\engine\interior\pathedInterior.cc(301) : warning C4700: local variable 'pathPos' used without having been initialized


worldEditor.cc
../engine\editor/worldEditor.h(175) : error C2535: 'void __thiscall WorldEditor::renderObjectBox(class SceneObject *,const class ColorI &)' : member function already defined or declared
../engine\editor/worldEditor.h(164) : see declaration of 'renderObjectBox'
../engine\editor/worldEditor.h(258) : error C2535: 'bool __thiscall WorldEditor::objClassIgnored(const class SceneObject *)' : member function already defined or declared
../engine\editor/worldEditor.h(163) : see declaration of 'objClassIgnored'


the worldeditor additions from the pack were already in the code. Should I just delete one of them? the warnings I have no idea about.


thanks
mario

#1
01/06/2005 (2:15 pm)
Hi Mario,

The warnings are stock TGE, but the errors I can help with. The methods 'WorldEditor::renderObjectBox' and 'WorldEditor::objClassIgnored' were moved towards the top of the 'WorldEditor' class definition to one of the public sections and can safely be removed from the private section (remove the definitions that are not in the Lighting Pack comment block). I've noted this and added the following comments to the Lighting Pack source to avoid confusion in future releases:

public:

...

      //-----------------------------------------------
      // Lighting Pack code block
      //-----------------------------------------------
      bool objClassIgnored(const SceneObject * obj);
      void renderObjectBox(SceneObject * obj, const ColorI & col);
      //-----------------------------------------------
      // Lighting Pack code block
      //-----------------------------------------------
	  

   private:

...
   
[b]      //-----------------------------------------------
      // Lighting Pack code block
      //-----------------------------------------------
      //void renderObjectBox(SceneObject * obj, const ColorI & col);
      //-----------------------------------------------
      // Lighting Pack code block
      //-----------------------------------------------[/b]

...

[b]      //-----------------------------------------------
      // Lighting Pack code block
      //-----------------------------------------------
      //bool objClassIgnored(const SceneObject * obj);
      //-----------------------------------------------
      // Lighting Pack code block
      //-----------------------------------------------[/b]

Thanks for point that out!

-John
#2
01/06/2005 (4:32 pm)
Thanks that worked. But now it gives me 78 new errors. They are all 'unresolved external symbols" errors, here are the first few.

Linking...
worldEditor.obj : error LNK2001: unresolved external symbol "public: static void __cdecl sgLightingFilter::sgRenderAllowedObjects(void *)" (?sgRenderAllowedObjects@sgLightingFilter@@SAXPAX@Z)
terrData.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall SceneObject::installLights(void)" (?installLights@SceneObject@@MAEXXZ)
waterBlock.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall SceneObject::installLights(void)" (?installLights@SceneObject@@MAEXXZ)
decalManager.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall SceneObject::installLights(void)" (?installLights@SceneObject@@MAEXXZ)
sceneObject.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall SceneObject::installLights(void)" (?installLights@SceneObject@@MAEXXZ)


they are all pretty similar to these. did I miss something along the way?

thanks again for all the help
Mario
#3
01/06/2005 (11:51 pm)
You need to add the Lighting Pack files to your project. From the Migration Guide:

Quote:
-Finally add the following files to the following Torque projects:

Torque Demo (VC++ 6 and 7) and XCode project

engine\synapseGaming\contentPacks\lightingPack\sgLighting.h
engine\synapseGaming\contentPacks\lightingPack\sgLightManager.cc
engine\synapseGaming\contentPacks\lightingPack\sgLightManager.h
engine\synapseGaming\contentPacks\lightingPack\sgLightMap.cc
engine\synapseGaming\contentPacks\lightingPack\sgLightMap.h
engine\synapseGaming\contentPacks\lightingPack\sgNewMethods.cc
engine\synapseGaming\contentPacks\lightingPack\sgNewMethods.h
engine\synapseGaming\contentPacks\lightingPack\sgSceneLighting.cc
engine\synapseGaming\contentPacks\lightingPack\sgSceneLighting.h
engine\synapseGaming\contentPacks\lightingPack\sgSceneLightingInsert.h
engine\synapseGaming\contentPacks\lightingPack\sgTSStatic.cc
engine\synapseGaming\contentPacks\lightingPack\sgTSStatic.h
engine\synapseGaming\contentPacks\lightingPack\sgUniversalStaticLight.cc
engine\synapseGaming\contentPacks\lightingPack\sgUniversalStaticLight.h

Torque Lib (VC++ 6 and 7)

engine\synapseGaming\contentPacks\lightingPack\sgLightManager.cc
engine\synapseGaming\contentPacks\lightingPack\sgLightMap.cc
engine\synapseGaming\contentPacks\lightingPack\sgNewMethods.cc
engine\synapseGaming\contentPacks\lightingPack\sgTSStatic.cc
#4
01/11/2005 (2:39 am)
Hi John,

I'm getting this compile error with the Lighting Pack 1.3.0 in VC7, i didn't use the stock TGE 1.3 but the one that came with the Lightning Pack. I don;t see any same errors with the other guys posting here.



LINK : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/INCREMENTAL:NO' specification
LIBCMT.lib(dosmap.obj) : error LNK2005: __dosmaperr already defined in LIBCD.lib(dosmap.obj)
LIBCMT.lib(close.obj) : error LNK2005: __close already defined in LIBCD.lib(close.obj)
LIBCMT.lib(read.obj) : error LNK2005: __read already defined in LIBCD.lib(read.obj)
LIBCMT.lib(lseek.obj) : error LNK2005: __lseek already defined in LIBCD.lib(lseek.obj)
LIBCMT.lib(osfinfo.obj) : error LNK2005: __set_osfhnd already defined in LIBCD.lib(osfinfo.obj)
LIBCMT.lib(osfinfo.obj) : error LNK2005: __free_osfhnd already defined in LIBCD.lib(osfinfo.obj)
LIBCMT.lib(osfinfo.obj) : error LNK2005: __get_osfhandle already defined in LIBCD.lib(osfinfo.obj)
LIBCMT.lib(osfinfo.obj) : error LNK2005: __alloc_osfhnd already defined in LIBCD.lib(osfinfo.obj)
LIBCMT.lib(osfinfo.obj) : error LNK2005: __open_osfhandle already defined in LIBCD.lib(osfinfo.obj)
LIBCMT.lib(mbctype.obj) : error LNK2005: __getmbcp already defined in LIBCD.lib(mbctype.obj)
LIBCMT.lib(mbctype.obj) : error LNK2005: __setmbcp already defined in LIBCD.lib(mbctype.obj)
LIBCMT.lib(mbctype.obj) : error LNK2005: ___initmbctable already defined in LIBCD.lib(mbctype.obj)
LIBCMT.lib(write.obj) : error LNK2005: __write already defined in LIBCD.lib(write.obj)
LIBCMT.lib(lseeki64.obj) : error LNK2005: __lseeki64 already defined in LIBCD.lib(lseeki64.obj)
LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
../tools/texture2bm8_DEBUG.exe : fatal error LNK1169: one or more multiply defined symbols found
#5
01/11/2005 (3:10 pm)
Hi Roger,

I think the Texture2Bm8 project was retired. It doesn't build in stock TGE 1.3 and I don't think it built properly in TGE 1.2 either. If you're trying to build Torque and mistakenly built the Texture2Bm8 project then open the Torque SDK in VC++, right click the 'Torque Demo' project, and select 'Set as Active Project' now you can build Torque.

Let me know if this helps!

-John
#6
01/11/2005 (4:30 pm)
Thanks John,
I did that but it didn't work, but it gave me the idea to right click on the "root", the "Solution Torque SDK" and from there I looked around and then check out the texteure2Bm8 project. That solved my compile/link errors.

-roger
#7
01/11/2005 (11:18 pm)
Cool, I'm glad everything is working now. I might just remove the Texture2Bm8 project from the Torque SDK project group to avoid confusion in the future.

Thanks for pointing this out!

-John
#8
02/11/2005 (7:20 pm)
Hi, is this Migration Guide (I guess it's some sort of integration guide for the SGLP) anywhere online?

And if not, here's what I did. Just want to see if this makes sense.

I manually added the files mentioned into my Torque Demo and Torque Lib projects.

Then I copied the SynapseGaming directory over to the Torque SDK engine directory. So basically copied: \SynapseGaming\contentPacks\LightingPack\engine\synapseGaming\ to
\Torque\SDK\engine\

Then I ran WinMerge on:
\SynapseGaming\contentPacks\LightingPack\ and
\Torque\SDK\
and basically copied all differing files and files that only existed in the SGLP from the the SGLP over to the TGE.

This was all out of order. I probably could have just ran WinMerge and then added the files afterwards if WinMerge didn't modify the projects themselves already. I didn't copy over the binary file differing ones though which is probaly where the file additions to the projects would have been. Then I compiled and it compiled ok. If that all made sense, is that the correct way of merging?

Also, if it is, can I just delete my Synapse Gaming Directory now. I still have the .zip file and I don't see why I would need to have it all unzipped still.

Thanks.

Edit: Oh cool, I didn't see that post below. Thanks John. That was super fast. Thanks!

Edit 2: I just removed the texture2bm8 from the build. I was getting the same errors. This way I can still build the solution and not just the Torque Demo. Can I just totally delete the texture2bm8 files from the solution?
#9
02/11/2005 (7:43 pm)
Hi Edward,

Check out this thread Synapse Gaming Lighting Pack - Migration Guide.

In future versions the Migration Guide will be packaged in the Lighting Pack download.

Let me know if this helps!

-John