User forums > Help

GNU GCC Compiler is compiling REALLY slow.

<< < (2/8) > >>

thomas:
I have 1GB on this machine too, and I have on the order of 700MB free RAM while compiling, so I assume you really mean 750MB rather than 750kB .

That of course would rule out the theory of swapping (unless something is seriously amiss). Just to be sure anyway, did you ever look at the page faults?
Does the compiler (gcc.exe, or cc1.exe, or cc1-plus.exe, or some similar name) actually get CPU time at all (should be 99-100%)? And what is its memory consumption?
Have you tried disabling all non-vital services and closing all other applications including all those taskbar icons? The chances are small, but it has to be something...

I've been thinking about include files being read in recursively in an endless loop. That might, too, take an endless time and fail after a long time. However, I know for sure SDL does no such thing, it works fine for me using Code::Blocks and MinGW. Also, there is really not much you could possibly have done wrong, only need to copy all header files... Sounds unlikely that SDL is the problem.

Alos:
None of the things you listed (gcc.exe, or cc1.exe, or cc1-plus.exe) show up, its just codeblocks. Is that what is wrong? The way I compile? I just put the code into codeblocks and push the blue gear button at the top(when i keep my mouse over the button it is called compile, so i assume thats the right way to do it).

thomas:

--- Quote from: Alos on October 03, 2005, 01:06:31 am ---None of the things you listed (gcc.exe, or cc1.exe, or cc1-plus.exe) show up, its just codeblocks. Is that what is wrong?
--- End quote ---
Go to Compiler menu -> Compiler Options. Check your compiler executables are listed correctly under the "Programs" tab. Also check that you use the correct default compiler. If not, try auto-detect, and if that fails for some reason, enter the paths by hand.
While compiling, the mentioned programs should show in task manager (only for a second or two, usually).


--- Quote from: Alos on October 03, 2005, 01:06:31 am ---I just put the code into codeblocks and push the blue gear button at the top
--- End quote ---
Umm... this sounds like you do not have a project at all? That is surprising, should not be possible at all... do you use an old version of Code::Blocks? RC1-1 disables the blue gear when there is no active project. Or, do you maybe have another project as the active project and compile that one by accident?

EDIT:
To clarify the last point... in the project manager to the left, whatever project prints in bold is what gets compiled when you hit the blue gear -- not the file that happens to be open in the editor.
RC1-1 does have a function called "Compile single file" too, accessible from the compiler menu, earlier versions don't.

Alos:
Yea i have a project, i did new project, sdl app, then copy the code into it, then use the blue gear. and in the programs tab, im not really sure how to configure it. but this is how it is after auto detect.

C compiler: mingw32-gcc.exe
C++ compiler: mingw32-g++.exe
linker for dynamic libs: mingw32-g++.exe
linker of static libs: ar.exe
debugger: gdb.exe
resource compiler: windres.exe
make program: mingw32-make.exe

Are they all on the right files?

thomas:

--- Quote from: Alos on October 03, 2005, 03:01:32 am ---in the programs tab, im not really sure how to configure it. but this is how it is after auto detect.
[...]
Are they all on the right files?

--- End quote ---
Yes, those are the right file names, and since you do not get an "execute failed" error, the path is ok as well.
It surprises me that the compiler does not show in task manager, it really should. Which process takes up all the CPU time when you have task manager open?

Did you ever try to compile something else, say a simple empty standard-C main() function with no includes?
Just to see if anything compiles at all. If that works, then it is probably not a compiler problem.

On a different subject, your code sample should have #include <SDL.h> instead of #include "SDL.h". Of course that is merely cosmetic, and not likely the cause of your problem. Still, it is "more correct", since SDL.h is in the system include folder rather than the project folder.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version