[Dev-C++] [Help] Unable to link lots of object files
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Tom C. <jat...@gm...> - 2003-05-28 00:33:44
|
I have just migrated a fairly large project from Visual C++ to Dev-C++ and GCC, and am experiencing trouble at the final hurdle: my system refuses to link all of the project's object files. After much experimenting on my part, it seems quite simply that if the command line is too long when running g++ (via make) to link my 60-odd object files, g++ fails to load and the error "Bad command or file name" is given. This happens regardless of whether I run make directly from the command line or via the Compile and Run option in Dev-C++. So, for example, the first command below fails with "Bad command or file name", while the second works. I need all my object files, though, so that's no good. g++.exe [~60 .o files here] -o"prog.exe" [some -L and -l tags] g++.exe [~40 .o files here] -o"prog.exe" [some -L and -l tags] Does anyone know of any way to circumvent this desperately frustrating problem? Is there, for example, a way to combine object files so I have fewer of them? At the moment I have one object file for each CPP file I'm compiling. I am using Windows Me (for all my sins), GCC 3.2 (Mingw version), and Dev-C++ 4.9.8.0. --Tom |