[ scummvm-Bugs-1700986 ] MSVC8: Build errors

SourceForge.net noreply at sourceforge.net
Sun Apr 15 15:24:27 CEST 2007


Bugs item #1700986, was opened at 2007-04-15 16:24
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=418820&aid=1700986&group_id=37116

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Filippos (thebluegr)
Assigned to: Nobody/Anonymous (nobody)
Summary: MSVC8: Build errors

Initial Comment:
I get several warnings and some errors with MSVC8 when trying to build ScummVM:

Warnings:
Warning	13	warning C4701: potentially uninitialized local variable 'retSize' used	c:\projects\scummvm\scummvm\trunk\engines\gob\inter_v1.cpp	2251	
Warning	15	warning C4701: potentially uninitialized local variable 'x' used	c:\projects\scummvm\scummvm\trunk\engines\gob\util.cpp	129	
Warning	16	warning C4701: potentially uninitialized local variable 'y' used	c:\projects\scummvm\scummvm\trunk\engines\gob\util.cpp	129	
Warning	12	warning C4701: potentially uninitialized local variable 'dataSize' used	c:\projects\scummvm\scummvm\trunk\engines\gob\inter_v2.cpp	2089	
Warning	13	warning C4701: potentially uninitialized local variable 'retSize' used	c:\projects\scummvm\scummvm\trunk\engines\gob\inter_v2.cpp	1880	

These are fixed if line 85 of gob/util.cpp is changed from:
	int16 x, y;
to:
       	int16 x = 0;
	int16 y = 0;

and line 2220 of gob/inter_v1.cpp is changed from:
	int16 retSize;
to:
	int16 retSize = 0;

and line 1817 of gob/inter_v2.cpp is changed from:
	int32 retSize;
to:
	int32 retSize = 0;

and line 2020 of gob/inter_v2.cpp is changed from:
	uint32 dataSize;
to:
	uint32 dataSize = 0;

It also can't find 2 obj files: 
Error	1	fatal error LNK1181: cannot open input file '.\agi_release\patches.obj'	agi	
Error	2	fatal error LNK1181: cannot open input file '.\lure_release\system.obj'	lure	

Also, some of the projects have to be updated, as they point to files which are no longer there (removed by some commits):

* In the agi engine, file patches.cpp no longer exists
* In the gob engine, files anim.h, anim.cpp, pack.h, pack.cpp, timer.h, timer.cpp no longer exist
* In the lure engine, files system.h and system.cpp no longer exist

And it throws several warnings, which are treated as errors and the project refuses to be built (I've set 

Error	3	error C2220: warning treated as error - no 'object' file generated	c:\projects\scummvm\scummvm\trunk\engines\gob\inter_v2.cpp	2006	
Warning	4	warning C4800: 'uint32' : forcing value to bool 'true' or 'false' (performance warning)	c:\projects\scummvm\scummvm\trunk\engines\gob\inter_v2.cpp	2006	
Warning	5	warning C4800: 'uint32' : forcing value to bool 'true' or 'false' (performance warning)	c:\projects\scummvm\scummvm\trunk\engines\gob\inter_v2.cpp	2007	
Warning	6	warning C4800: 'uint32' : forcing value to bool 'true' or 'false' (performance warning)	c:\projects\scummvm\scummvm\trunk\engines\gob\inter_v2.cpp	2010	
Warning	7	warning C4800: 'uint32' : forcing value to bool 'true' or 'false' (performance warning)	c:\projects\scummvm\scummvm\trunk\engines\gob\inter_v2.cpp	2011	
Error	8	error C2220: warning treated as error - no 'object' file generated	c:\projects\scummvm\scummvm\trunk\engines\gob\game.cpp	136	
Warning	9	warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)	c:\projects\scummvm\scummvm\trunk\engines\gob\game.cpp	136	
Error	10	error C2220: warning treated as error - no 'object' file generated	c:\projects\scummvm\scummvm\trunk\engines\gob\draw_v2.cpp	561	
Warning	11	warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)	c:\projects\scummvm\scummvm\trunk\engines\gob\draw_v2.cpp	561	
Error	12	error C2220: warning treated as error - no 'object' file generated	c:\projects\scummvm\scummvm\trunk\engines\scumm\sound.cpp	1224	
Warning	13	warning C4245: '=' : conversion from '' to 'uint32', signed/unsigned mismatch	c:\projects\scummvm\scummvm\trunk\engines\scumm\sound.cpp	1224	
Warning	14	warning C4245: '=' : conversion from '' to 'uint32', signed/unsigned mismatch	c:\projects\scummvm\scummvm\trunk\engines\scumm\sound.cpp	1248	
Warning	15	warning C4245: '=' : conversion from '' to 'uint32', signed/unsigned mismatch	c:\projects\scummvm\scummvm\trunk\engines\scumm\sound.cpp	2110	
Error	16	error C2220: warning treated as error - no 'object' file generated	c:\projects\scummvm\scummvm\trunk\engines\scumm\resource_v3.cpp	57	
Warning	17	warning C4245: '=' : conversion from '' to 'uint32', signed/unsigned mismatch	c:\projects\scummvm\scummvm\trunk\engines\scumm\resource_v3.cpp	57	
Error	18	error C2220: warning treated as error - no 'object' file generated	c:\projects\scummvm\scummvm\trunk\engines\scumm\resource_v2.cpp	96	
Warning	19	warning C4245: '=' : conversion from '' to 'uint32', signed/unsigned mismatch	c:\projects\scummvm\scummvm\trunk\engines\scumm\resource_v2.cpp	96	
Warning	20	warning C4245: '=' : conversion from '' to 'uint32', signed/unsigned mismatch	c:\projects\scummvm\scummvm\trunk\engines\scumm\resource_v2.cpp	105	
Warning	21	warning C4245: '=' : conversion from '' to 'uint32', signed/unsigned mismatch	c:\projects\scummvm\scummvm\trunk\engines\scumm\resource_v2.cpp	114	
Warning	22	warning C4245: '=' : conversion from '' to 'uint32', signed/unsigned mismatch	c:\projects\scummvm\scummvm\trunk\engines\scumm\resource_v2.cpp	123	

In particular, it doesn't like some (not all of) the RES_INVALID_OFFSET constants and some of the bool casts in the gob engine

I'm not sure how to fix those warnings, and since "Treat warnings as errors" is set to "Yes" (under configuration properties->C/C++->General), the project fails to compile. I've tried setting this to "No", and then VC8 continues, but then it throws 17 unresolved externals:

Error	15	error LNK2001: unresolved external symbol "public: __thiscall DefaultEventManager::DefaultEventManager(class OSystem *)" (??0DefaultEventManager@@QAE at PAVOSystem@@@Z)	system.obj	
Error	16	error LNK2001: unresolved external symbol "bool __cdecl Audio::loadAIFFFromStream(class Common::SeekableReadStream &,int &,int &,unsigned char &)" (?loadAIFFFromStream at Audio@@YA_NAAVSeekableReadStream at Common@@AAH1AAE at Z)	sword1.lib	
Error	17	error LNK2001: unresolved external symbol "public: __thiscall Gob::SaveLoad_v3::SaveLoad_v3(class Gob::GobEngine *,char const *)" (??0SaveLoad_v3 at Gob@@QAE at PAVGobEngine@1 at PBD@Z)	gob.lib	
Error	18	error LNK2001: unresolved external symbol "public: __thiscall Gob::Goblin_v3::Goblin_v3(class Gob::GobEngine *)" (??0Goblin_v3 at Gob@@QAE at PAVGobEngine@1@@Z)	gob.lib	
Error	19	error LNK2001: unresolved external symbol "public: __thiscall Gob::Inter_v3::Inter_v3(class Gob::GobEngine *)" (??0Inter_v3 at Gob@@QAE at PAVGobEngine@1@@Z)	gob.lib	
Error	20	error LNK2001: unresolved external symbol "public: __thiscall Gob::SaveLoad_v2::SaveLoad_v2(class Gob::GobEngine *,char const *)" (??0SaveLoad_v2 at Gob@@QAE at PAVGobEngine@1 at PBD@Z)	gob.lib	
Error	21	error LNK2001: unresolved external symbol "public: __thiscall Gob::ImdPlayer::ImdPlayer(class Gob::GobEngine *)" (??0ImdPlayer at Gob@@QAE at PAVGobEngine@1@@Z)	gob.lib	
Error	22	error LNK2001: unresolved external symbol "public: void __thiscall Gob::ImdPlayer::play(char const *,short,short,bool)" (?play at ImdPlayer@Gob@@QAEXPBDFF_N at Z)	gob.lib	
Error	23	error LNK2001: unresolved external symbol "public: void __thiscall Gob::ImdPlayer::play(char const *,short,short,short,short,bool,bool)" (?play at ImdPlayer@Gob@@QAEXPBDFFFF_N1 at Z)	gob.lib	
Error	24	error LNK2001: unresolved external symbol "public: void __thiscall Gob::ImdPlayer::closeImd(void)" (?closeImd at ImdPlayer@Gob@@QAEXXZ)	gob.lib	
Error	25	error LNK2001: unresolved external symbol "public: void __thiscall Gob::ImdPlayer::closeImd(void)" (?closeImd at ImdPlayer@Gob@@QAEXXZ)	gob.lib	
Error	26	error LNK2001: unresolved external symbol "public: void __thiscall Gob::ImdPlayer::closeImd(void)" (?closeImd at ImdPlayer@Gob@@QAEXXZ)	gob.lib	
Error	27	error LNK2001: unresolved external symbol "public: void __thiscall Gob::ImdPlayer::play(short,unsigned short,short,short,short,short)" (?play at ImdPlayer@Gob@@QAEXFGFFFF at Z)	gob.lib	
Error	28	error LNK2001: unresolved external symbol "public: void __thiscall Gob::ImdPlayer::play(short,unsigned short,short,short,short,short)" (?play at ImdPlayer@Gob@@QAEXFGFFFF at Z)	gob.lib	
Error	29	error LNK2001: unresolved external symbol "public: signed char __thiscall Gob::ImdPlayer::openImd(char const *,short,short,short,short)" (?openImd at ImdPlayer@Gob@@QAECPBDFFFF at Z)	gob.lib	
Error	30	error LNK2001: unresolved external symbol "public: signed char __thiscall Gob::ImdPlayer::openImd(char const *,short,short,short,short)" (?openImd at ImdPlayer@Gob@@QAECPBDFFFF at Z)	gob.lib	
Error	31	error LNK2001: unresolved external symbol "public: void __thiscall Gob::ImdPlayer::finishImd(struct Gob::ImdPlayer::Imd * &)" (?finishImd at ImdPlayer@Gob@@QAEXAAPAUImd at 12@@Z)	gob.lib	
Error	32	error LNK2001: unresolved external symbol "public: struct Gob::ImdPlayer::Imd * __thiscall Gob::ImdPlayer::loadImdFile(char const *,class Gob::SurfaceDesc *,signed char)" (?loadImdFile at ImdPlayer@Gob@@QAEPAUImd at 12@PBDPAVSurfaceDesc at 2@C at Z)	gob.lib	
Error	33	error LNK2001: unresolved external symbol "public: long __thiscall Gob::SaveLoad::getSize(enum Gob::SaveType)" (?getSize at SaveLoad@Gob@@QAEJW4SaveType at 2@@Z)	gob.lib	
Error	34	error LNK2001: unresolved external symbol "public: bool __thiscall Gob::SaveLoad::load(enum Gob::SaveType,short,long,long)" (?load at SaveLoad@Gob@@QAE_NW4SaveType at 2@FJJ at Z)	gob.lib	
Error	35	error LNK2001: unresolved external symbol "public: bool __thiscall Gob::SaveLoad::save(enum Gob::SaveType,short,long,long)" (?save at SaveLoad@Gob@@QAE_NW4SaveType at 2@FJJ at Z)	gob.lib

	
I got no clue on how to fix those, so I can't build the solution

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=418820&aid=1700986&group_id=37116




More information about the Scummvm-tracker mailing list