From: Pascal B. <pb...@tr...> - 2003-11-14 07:38:26
|
From: "Greg Chicares" <chi...@mi...> > Pascal Buhler wrote: > > > > I have a large library project that takes on linux under one minute to link. > > On Windows using MinGW this same project takes about 30 minutes to build and > > up to one hour to link. If I build it as a static library > > Are you usually, however, building it as a dll? > If so, are you using '-shared', or are you using dllwrap? > This kind of performance is typical of dllwrap. Yes usually as a dll. I am not using dllwrap that I know of. Here is the basic configuration. CFLAGS = -Wall -O2 -fno-exceptions -fno-rtti CXXFLAGS = -Wall -O2 -fno-exceptions -fno-rtti LINK = g++ LFLAGS = -Wl,-s -Wl,-subsystem,windows -shared -Wl,--export-all-symbols -Wl,--out-i mplib,libsomelib.a > > up to one hour to link. If I build it as a static library and then link an > > application against that, the application takes only around 20 seconds to > > link. I really think I must be doing some thing wrong but can't find it. > > > > The machine I use is 2GHz with 750 MB ram. > > It might be helpful to know resource usage. > I've built libraries that have taken > 300 Mb of an available 500 Mb of RAM, and > 10% of available CPU time, > and have monopolized the hard drive for > a few minutes. For the first 20 minutes cpu is at 100% and the memory usage peaks at around 1GB (not just g++, but I have no other applications running) after that cpu and memory usage drops and it starts to create the library. thanks pascal |