Tremulous Forum
		Mods => Modding Center => Topic started by: rotacak on June 06, 2009, 04:47:55 pm
		
			
			- 
				Hi, I trying to compile my mod and I got errors like this one:
 
 src/game/bg_misc.c:57: warning: shifting an `int' by 37 bits is undefined
 src/game/bg_misc.c:57: warning: shifting an `int' by 38 bits is undefined
 src/game/bg_misc.c:57: initializer must be constant
 
 In sources it is this part:
     ( 1 << WP_ABUILD )|( 1 << WP_ABUILD2 ),    //weapon_t  buildWeapon;I din't touched that part of code. Anyone know what that error message is?
 
 And when I run make again, then this appear:
 make[2]: `build/release-mingw32-x86/tremulous.x86.exe' is up to date.
 Q3LCC src/game/bg_pmove.c
 cpp: src/game/bg_pmove.c:3531 No newline at end of file
 Q3LCC src/game/bg_slidemove.c
 Q3LCC src/cgame/cg_consolecmds.c
 cpp: src/cgame/cg_consolecmds.c:329 No newline at end of file
 Q3LCC src/cgame/cg_buildable.c
 cpp: src/cgame/cg_buildable.c:1479 No newline at end of file
 Q3LCC src/cgame/cg_animation.c
 Q3LCC src/cgame/cg_animmapobj.c
 Q3LCC src/cgame/cg_draw.c
 Q3LCC src/cgame/cg_drawtools.c
 Q3LCC src/cgame/cg_ents.c
 Q3LCC src/cgame/cg_event.c
 Q3LCC src/cgame/cg_marks.c
 Q3LCC src/cgame/cg_players.c
 Q3LCC src/cgame/cg_playerstate.c
 Q3LCC src/cgame/cg_predict.c
 Q3LCC src/cgame/cg_servercmds.c
 cpp: src/cgame/cg_servercmds.c:1198 No newline at end of file
 Q3LCC src/cgame/cg_snapshot.c
 Q3LCC src/cgame/cg_view.c
 Q3LCC src/cgame/cg_weapons.c
 Q3LCC src/cgame/cg_mem.c
 Q3LCC src/cgame/cg_scanner.c
 cpp: src/cgame/cg_scanner.c:449 No newline at end of file
 Q3LCC src/cgame/cg_attachment.c
 Q3LCC src/cgame/cg_trails.c
 Q3LCC src/cgame/cg_particles.c
 Q3LCC src/cgame/cg_ptr.c
 Q3LCC src/cgame/cg_tutorial.c
 cpp: src/cgame/cg_tutorial.c:687 No newline at end of file
 Q3LCC src/ui/ui_shared.c
 Q3LCC src/qcommon/q_math.c
 Q3LCC src/qcommon/q_shared.c
 Q3LCC src/game/bg_lib.c
 Q3ASM build/release-mingw32-x86/base/vm/cgame.qvm
 error: symbol BG_FindModelNameForClass undefined
 error: symbol BG_FindSkinNameForClass undefined
 error: symbol BG_InitClassOverrides undefined
 error: symbol BG_InitBuildableOverrides undefined
 error: symbol BG_InitAllowedGameElements undefined
 error: symbol $57_1 undefined
 error: symbol $58_1 undefined
 error: symbol $59_1 undefined
 error: symbol $60_1 undefined
 error: symbol $61_1 undefined
 error: symbol $62_1 undefined
 error: symbol $63_1 undefined
 error: symbol $64_1 undefined
 error: symbol $65_1 undefined
 error: symbol $66_1 undefined
 error: symbol $67_1 undefined
 error: symbol $68_1 undefined
 error: symbol $69_1 undefined
 error: symbol $70_1 undefined
 error: symbol $71_1 undefined
 error: symbol $72_1 undefined
 error: symbol $73_1 undefined
 error: symbol $74_1 undefined
 error: symbol $75_1 undefined
 error: symbol $72_1 undefined
 Multiple definitions for $72_1_1
 error: symbol $76_1 undefined
 error: symbol $77_1 undefined
 error: symbol $78_1 undefined
 error: symbol $79_1 undefined
 error: symbol $80_1 undefined
 error: symbol $81_1 undefined
 error: symbol $82_1 undefined
 error: symbol $83_1 undefined
 error: symbol $84_1 undefined
 error: symbol $85_1 undefined
 error: symbol $86_1 undefined
 error: symbol $87_1 undefined
 error: symbol $88_1 undefined
 error: symbol $89_1 undefined
 error: symbol $90_1 undefined
 error: symbol $91_1 undefined
 error: symbol $92_1 undefined
 error: symbol $93_1 undefined
 error: symbol $94_1 undefined
 error: symbol $95_1 undefined
 error: symbol $96_1 undefined
 error: symbol $97_1 undefined
 error: symbol $98_1 undefined
 error: symbol $99_1 undefined
 error: symbol $100_1 undefined
 error: symbol $101_1 undefined
 error: symbol $102_1 undefined
 error: symbol $103_1 undefined
 error: symbol $104_1 undefined
 error: symbol $105_1 undefined
 error: symbol $106_1 undefined
 error: symbol $107_1 undefined
 error: symbol $108_1 undefined
 error: symbol $109_1 undefined
 error: symbol $110_1 undefined
 error: symbol $111_1 undefined
 error: symbol $112_1 undefined
 error: symbol $113_1 undefined
 error: symbol $114_1 undefined
 error: symbol $115_1 undefined
 error: symbol $116_1 undefined
 error: symbol $117_1 undefined
 error: symbol $118_1 undefined
 error: symbol $119_1 undefined
 error: symbol $120_1 undefined
 error: symbol $121_1 undefined
 error: symbol $88_1 undefined
 Multiple definitions for $88_1_1
 error: symbol $89_1 undefined
 Multiple definitions for $89_1_1
 error: symbol $122_1 undefined
 error: symbol $91_1 undefined
 Multiple definitions for $91_1_1
 error: symbol $92_1 undefined
 Multiple definitions for $92_1_1
 error: symbol $93_1 undefined
 Multiple definitions for $93_1_1
 error: symbol $123_1 undefined
 error: symbol $95_1 undefined
 Multiple definitions for $95_1_1
 error: symbol $96_1 undefined
 Multiple definitions for $96_1_1
 error: symbol $97_1 undefined
 Multiple definitions for $97_1_1
 error: symbol $124_1 undefined
 error: symbol $99_1 undefined
 Multiple definitions for $99_1_1
 error: symbol $100_1 undefined
 Multiple definitions for $100_1_1
 error: symbol $101_1 undefined
 Multiple definitions for $101_1_1
 error: symbol $102_1 undefined
 Multiple definitions for $102_1_1
 error: symbol $103_1 undefined
 Multiple definitions for $103_1_1
 error: symbol $125_1 undefined
 error: symbol $105_1 undefined
 Multiple definitions for $105_1_1
 error: symbol $106_1 undefined
 Multiple definitions for $106_1_1
 error: symbol $107_1 undefined
 Multiple definitions for $107_1_1
 error: symbol $126_1 undefined
 error: symbol $109_1 undefined
 Multiple definitions for $109_1_1
 error: symbol BG_AddPredictableEventToPlayerstate undefined
 error: symbol BG_FindStopSpeedForClass undefined
 error: symbol BG_FindFrictionForClass undefined
 error: symbol BG_InventoryContainsUpgrade undefined
 error: symbol BG_FindJumpMagnitudeForClass undefined
 error: symbol BG_ClassHasAbility undefined
 error: symbol BG_FindAirAccelerationForClass undefined
 error: symbol BG_FindAccelerationForClass undefined
 error: symbol BG_FindBBoxForClass undefined
 error: symbol BG_FindViewheightForClass undefined
 error: symbol BG_FindBobCycleForClass undefined
 error: symbol BG_InventoryContainsWeapon undefined
 error: symbol BG_UpgradeIsActive undefined
 error: symbol BG_DeactivateUpgrade undefined
 error: symbol BG_ActivateUpgrade undefined
 error: symbol BG_UnpackAmmoArray undefined
 error: symbol BG_FindAmmoForWeapon undefined
 error: symbol BG_FindInfinteAmmoForWeapon undefined
 error: symbol BG_FindUsesEnergyForWeapon undefined
 error: symbol BG_PackAmmoArray undefined
 error: symbol BG_FindReloadTimeForWeapon undefined
 error: symbol BG_WeaponHasThirdMode undefined
 error: symbol BG_FindRepeatRate3ForWeapon undefined
 error: symbol BG_WeaponHasAltMode undefined
 error: symbol BG_FindRepeatRate2ForWeapon undefined
 error: symbol BG_FindRepeatRate1ForWeapon undefined
 error: symbol BG_RotateAxis undefined
 error: symbol BG_FindBuildTimeForBuildable undefined
 error: symbol BG_FindNameForBuildable undefined
 error: symbol BG_FindModelsForBuildable undefined
 error: symbol BG_FindTeamForBuildable undefined
 error: symbol BG_FindHumanNameForBuildable undefined
 error: symbol BG_FindBBoxForBuildable undefined
 error: symbol BG_PositionBuildableRelativeToPlayer undefined
 error: symbol BG_FindZOffsetForBuildable undefined
 error: symbol BG_FindModelScaleForBuildable undefined
 error: symbol BG_FindTransparentTestForBuildable undefined
 error: symbol BG_FindHealthForBuildable undefined
 error: symbol BG_FindTeamForWeapon undefined
 error: symbol BG_FindProjTypeForBuildable undefined
 error: symbol BG_FindBuildDelayForWeapon undefined
 error: symbol BG_FindUsableForBuildable undefined
 error: symbol BG_FindLongRangedForWeapon undefined
 error: symbol BG_FindHudNameForClass undefined
 error: symbol BG_EvaluateTrajectoryDelta undefined
 error: symbol BG_EvaluateTrajectory undefined
 error: symbol BG_PlayerStateToEntityState undefined
 error: symbol BG_FindHumanNameForClassNum undefined
 error: symbol BG_FindSteptimeForClass undefined
 error: symbol BG_FindShadowScaleForClass undefined
 error: symbol BG_FindModelScaleForClass undefined
 error: symbol BG_FindZOffsetForClass undefined
 error: symbol BG_ClassCanEvolveFromTo undefined
 error: symbol BG_FindStagesForClass undefined
 error: symbol BG_ClassIsAllowed undefined
 error: symbol BG_FindPurchasableForWeapon undefined
 error: symbol BG_FindPurchasableForUpgrade undefined
 error: symbol BG_FindBobForClass undefined
 error: symbol BG_FindFovForClass undefined
 error: symbol BG_FindZoomFovForWeapon undefined
 error: symbol BG_WeaponCanZoom undefined
 error: symbol BG_FindNameForUpgrade undefined
 error: symbol BG_FindHumanNameForUpgrade undefined
 error: symbol BG_FindIconForUpgrade undefined
 error: symbol BG_FindNameForWeapon undefined
 error: symbol BG_FindHumanNameForWeapon undefined
 error: symbol BG_FindUsableForUpgrade undefined
 error: symbol atof_neg undefined
 error: symbol atoi_neg undefined
 error: symbol BG_UpgradeClassAvailable undefined
 make[2]: *** [build/release-mingw32-x86/base/vm/cgame.qvm] Error 181
 
 Thanx for any help.
- 
				what distro and make version are you using?
 (I dont think it would make a difference unless you have a high security ebuild target on a gentoo based system)
- 
				Win xp, Make version 3.79.1. But problem is somewhere else. I can compile unmodified sources, but when I make some changes, then this error appears. I added few things into bg_public.h in:
 typedef enum
 {
 ....
 ....
 SOMETHINGNEW,
 ....
 ....
 } weapon_t;
 
and in few more enum blocks. If I delete that new lines and temporary use them outside enum blocks:
 #define SOMETHINGNEW 500then that errors disappear.
- 
				do a make clean before trying to compile it, it doesn't always compile everything it should when headers are changed.
			
- 
				you added too many weapons.
			
- 
				David: it is strange. If I remove added weapons, then I use make clear, make, then appear error (warning: shifting an...). But if I do "make" again, it is compiled without errors.
 
 kevlarman: hmm. And how I can increase allowed amount?
- 
				iirc you'd have to change the protocol as certain things depend on exact sizes (i.e. int)
			
- 
				David: it is strange. If I remove added weapons, then I use make clear, make, then appear error (warning: shifting an...). But if I do "make" again, it is compiled without errors.
 
 kevlarman: hmm. And how I can increase allowed amount?
 
 the short answer is that you can't. the long answer won't fit in a thread like this.
- 
				David: it is strange. If I remove added weapons, then I use make clear, make, then appear error (warning: shifting an...). But if I do "make" again, it is compiled without errors.
 
 kevlarman: hmm. And how I can increase allowed amount?
 
 the short answer is that you can't. the long answer won't fit in a thread like this.
 
 So in Tremulous is impossible to add new weapons, because enumeration cant handle 10 more numbers? :o
- 
				the enum can handle millions.  The code that uses it is limited to 32 (I think).