|
Forum List • Thread List • Refresh • New Topic • Search • Previous • Next 1 |
1. Compilation under Dev-C++ is too slow #2322 Posted by: 2003-06-18 01:38:17 |
I am using Dev-C++ 4.9.8 and mingw compiler. i installed wxWindows using DevPaks. but it takes a lot of time ti compile a simple program. i literally stopped using wxWindows because of this.
Is there any kind of PCH (Precompiled Headers) support for Dev-C++. or any work-around for this problem.
thanx in advance |
2. Re: Compilation under Dev-C++ is too slow #2324 |
It's a well-known GCC problem, a cost of free you must pay :) Actually, it's a cost of code optimization. I heard GCC is a compiler who does the most comprehensively optimization. |
3. Re: Compilation under Dev-C++ is too slow #2325 Posted by: 2003-06-18 20:48:17 |
wxSamples/calendar/calendar.cpp (one cpp file) takes here 21seconds wxSamples/artprov/artpro.cpp (two cpp files) takes here 31 seconds
I only have a 1200 Duron with 133 MHz RAM Bus. I know machines 5 times faster than mine :), so one can suppose that these 31 seconds will in, a close future, be reduced to few seconds ; let's say less than 5 seconds ?
Jacques |
4. Re: Compilation under Dev-C++ is too slow #2326 |
If don't want to change the compiler, one thing we can do: divide the source into smaller cpp files, although this need better structured header files. Then, F9 or Ctrl-F9 will only compile the changed files, but the link time won't be saved. |
5. Re: Compilation under Dev-C++ is too slow #2333 Posted by: 2003-06-26 01:07:38 |
Also, I believe that including wx.h as a whole will greatly increase compile time, especially in multiple source files. Including ONLY those .h files for the controls you need will also speed up compile times...
Brian |
6. Re: Compilation under Dev-C++ is too slow #2341 Posted by: 2003-06-29 01:58:17 |
wxSamples/calendar/calendar.cpp (one cpp file) takes here 21seconds wxSamples/artprov/artpro.cpp (two cpp files) takes here 31 seconds
Sounds a bit strange. I'm on a Athlon 800 and it takes about 5-10 sec to compile these. Have you enabled debugging info or profiling?
upcase |
7. Re: Compilation under Dev-C++ is too slow #2342 Posted by: 2003-06-29 21:26:40 |
Well ! Here is my makefile for arttest (40 seconds today :)
I am new to C++ and new to wxWindows, not professional and rather old ... so ...
Jacques
#-------makefile.win-------- # Project: arttest # Makefile created by Dev-C++ 4.9.8.0
CPP = g++.exe CC = gcc.exe WINDRES = windres.exe RES = OBJ = artbrows.o arttest.o $(RES) LINKOBJ = artbrows.o arttest.o $(RES) LIBS = -L"C:/DEV-CPP/lib" -mwindows -s -lwxmswu -lstdc++ -lgcc -lodbc32 -lwsock32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lctl3d32 -ladvapi32 -lopengl32 -lglu32 -lole32 -loleaut32 -luuid INCS = -I"C:/DEV-CPP/include" CXXINCS = -I"C:/DEV-CPP/include/c++" -I"C:/DEV-CPP/include/c++/mingw32" -I"C:/DEV-CPP/include/c++/backward" -I"C:/DEV-CPP/include" BIN = artprov.exe CXXFLAGS = $(CXXINCS)-D_X86_=1 -DWIN32 -DWINVER=0x0400 -D__WIN95__ -D__GNUWIN32__ -D__WIN32__ -mthreads -DSTRICT -D__WXMSW__ -D__WINDOWS__ -Wall -fno-pcc-struct-return -O2 -fno-rtti -fno-exceptions -s CFLAGS = $(INCS) -s
.PHONY: all all-before all-after clean clean-custom
all: all-before artprov.exe all-after
clean: clean-custom rm -f $(OBJ) $(BIN)
$(BIN): $(LINKOBJ) $(CPP) $(LINKOBJ) -o "artprov.exe" $(LIBS)
artbrows.o: artbrows.cpp $(CPP) -c artbrows.cpp -o artbrows.o $(CXXFLAGS)
arttest.o: arttest.cpp $(CPP) -c arttest.cpp -o arttest.o $(CXXFLAGS) #-------END MAKEFILE.WIN-------- |
8. - #2393 Posted by: 2003-07-14 04:07:22 |
- |
9. Re: Compilation under Dev-C++ is too slow #2394 Posted by: 2003-07-14 07:20:51 |
Here is a possible solution that I use. (At least until gcc 3.4 is out and we have precompiled headers).
First I download dev-c++, wxWindows, and Borland's (yes, borlands) command line tools. I unpack wxWindows and compile with bcc. I then copy one of the makefile.b32 and <filename>.rc files from one of the samples, edit and rename them and throw them into my project directory. Then, to compile, I keep a cmd window open and just type make -f makefile.b32 (or up-enter) whenever I want a new binary, and I get the speed of borland's compiler and the usefullness of dev-c++ |
Forum List • Thread List • Refresh • New Topic • Search • Previous • Next 1 |