News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

mingw suddenly takeing hours to compile 100kb of C++ code?

Started by ouch, April 15, 2008, 11:47:38 PM

Previous topic - Next topic

ouch

Yeah, It happened when I decided to try to compile the svn version of codeblocks. Everything works fine except the version number always reads 0.

Anyway, for some reason it's now takeing mingw hours to compile my app when it took a minuate or two before the svn.

The problem is not the SVN itself as I can load up the release version and the same thing happens now.

I've checked my compiler settings and they havn't changed either.

The mingw app cc1plus.exe, also consumes vast amounts of memory. I started compilation 30 mins ago and it's at a little over 200MB and rising. But yet, If I let it run overnight I wake up to an exe that is just 3mb in size thankfully.

I tried clicking "reset compiler settings to default" but it didn't seem to do anything.

I can also compile wxsqlite3 fairly fast with the comand line so I think codeblocks is suddenly screwing up mingw compiles some how...

any ideas?

stahta01

Is svn.exe in your path?

If Code::Blocks can not run svn.exe then the svn used is normally 0.

Tim S
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

thomas

If a build suddenly takes hours instead of minutes without any code changes, you probably use precompiled headers and have them messed up somehow (for example by changing a compiler setting).
Deleting all precompiled headers should fix it.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

ouch

I was unable to find a file called svn.exe. where can I get it?

I did try to delete the precompiled headers and start over but the results are the same.

it still takes 59 minuates and 12 seconds to compile my 100kb project... 80% of the code at this point is deals with wxwidgets GUI creation. So it's not like I'm asking it to calculate the meaning of life...

thomas

"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

ouch

ok thanks for the link.

I tried deleteing the precompiled headers again and noticed something strange... it took 66 mins and 18 seconds to compile the headers (output is around 50mb) AND my project.

I mean wtf... how can it compile 50mb so quickly yet 100kb takes ages with the same settings?

edit: ok found the cause:

-pipe
-mthreads
[[if (PLATFORM == PLATFORM_MSW && (GetCompilerFactory().GetCompilerVersionString(_T("gcc")) >= _T("4.0.0"))) print(_T("-Wno-attributes"));]]
-Winvalid-pch
-include wx_pch.h

all that was in my other options tab... not sure how all that got in there, I sure didn't add it...

my compile times are now 1min 32sec. what a difference 5 lines make...