Im currently writing a vertical shooter with Dev-Cpp/allegro. When doing a complete rebuild, a linking error occurs. First all .cpp files are compiled, one by one to .o files, then I get this result:
It does work. I think the problem probably is the size of the argument list of g++ when linking. Is there any way around this, apart from manually relinking after each compile?
Greetings,
Lennaert van der Linden
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
Im currently writing a vertical shooter with Dev-Cpp/allegro. When doing a complete rebuild, a linking error occurs. First all .cpp files are compiled, one by one to .o files, then I get this result:
[...]
g++.exe -c source/ThreadRunner.cpp -o o/ThreadRunner.o -I"E:\DEV-CPP\include" -I"E:\DEV-CPP\include\g++-3" -I"E:\DEV-CPP\include" -I"E:\allegro\include" -I"C:\len\dream\tinyxml" -g3 -mwindows
windres.exe -i DREAM.RC -I rc -o dream.res -O coff
g++.exe o/Animation.o o/BaseClass.o o/BulletInterface.o o/dream.o o/DummyGrObj.o o/Enemy.o o/EnemyInterface.o o/GrObj.o o/Gun.o o/GunInterface.o o/Lightning.o o/Missile.o o/Player.o o/RotateGun.o o/Score.o o/TargetingGun.o o/Utils.o o/ObjectList.o o/HomingMissile.o o/Thread.o o/Bullet.o o/Instruction.o o/InstructionSet.o o/Exception.o o/Game.o o/ThreadRunner.o dream.res -o "system\dream.exe" -L"E:\DEV-CPP\lib" -L"E:\allegro\lib\mingw32" -L"C:\len\dream\tinyxml\lib" -lalleg -lTinyXmlLib -I"E:\DEV-CPP\include" -I"E:\DEV-CPP\include\g++-3" -I"E:\DEV-CPP\include" -I"E:\allegro\include" -I"C:\len\dream\tinyxml" -g3 -mwindows
Bad command or file name
Execution terminated
Compilation successful
And I get a message, the compilation was not succesfull. If I relink in the DOS command line:
g++ o/*.o dream.res -o "system\dream.exe" -L"E:\DEV-CPP\lib" -L"E:\allegro\lib\mingw32" -L"C:\len\dream\tinyxml\lib" -lalleg -lTinyXmlLib -I"E:\DEV-CPP\include" -I"E:\DEV-CPP\include\g++-3" -I"E:\DEV-CPP\include" -I"E:\allegro\include" -I"C:\len\dream\tinyxml" -g3 -mwindows
It does work. I think the problem probably is the size of the argument list of g++ when linking. Is there any way around this, apart from manually relinking after each compile?
Greetings,
Lennaert van der Linden
What about linking them one by one (one new file per version) ? Errors are easier to spot this way.