Author Topic: mingw suddenly takeing hours to compile 100kb of C++ code?  (Read 4037 times)

Offline ouch

  • Almost regular
  • **
  • Posts: 223
mingw suddenly takeing hours to compile 100kb of C++ code?
« on: April 15, 2008, 11:47:38 pm »
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?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7600
    • My Best Post
Re: mingw suddenly takeing hours to compile 100kb of C++ code?
« Reply #1 on: April 16, 2008, 04:15:01 am »
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++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: mingw suddenly takeing hours to compile 100kb of C++ code?
« Reply #2 on: April 16, 2008, 11:13:20 am »
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."

Offline ouch

  • Almost regular
  • **
  • Posts: 223
Re: mingw suddenly takeing hours to compile 100kb of C++ code?
« Reply #3 on: April 16, 2008, 06:47:59 pm »
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...

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: mingw suddenly takeing hours to compile 100kb of C++ code?
« Reply #4 on: April 16, 2008, 07:48:07 pm »
I was unable to find a file called svn.exe. where can I get it?
http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91

It is not related to your long compile times, however.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline ouch

  • Almost regular
  • **
  • Posts: 223
Re: mingw suddenly takeing hours to compile 100kb of C++ code?
« Reply #5 on: April 16, 2008, 07:59:03 pm »
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...
« Last Edit: April 16, 2008, 09:54:55 pm by ouch »