[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mingw-users
Subject:    [Mingw-users] Precompiling boost headers with MinGW cause cc1plus.exe to crash - again, this time wi
From:       Ádám Juhász <jadam1212 () gmail ! com>
Date:       2012-09-16 16:10:47
Message-ID: CABjEFnWzpjv4DXkQDgdTFMCyUdG1BDUHXKr3GbivRyMMQcBASg () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi,

some time ago I was asking about this issue I had with precompiled headers,
but I feel my situation was too complex.

Now I had the time to set up a small experiment: basically an empty project
with a single header which I try to precompile and include it to the single
source file.

The result is still the same: gcc precompiles the header then when it comes
to compiling the source file it crashes saying 'cc1plus.exe has stopped
working' (under Win7 64bit Home Premium edition).

To reproduce this you'll need boost (I have 1.49 here installed) and the
following files:

-----------------------------------------------------------------------------------------------------------------------------------------------------
                
-----------------------------------------------------------------------------------------------------------------------------------------------------
                
-----------------------------------------------------------------------------------------------------------------------------------------------------
 /*
 * precompiled.h
 */

#ifndef PRECOMPILED_H_
#define PRECOMPILED_H_

//boost

#include <boost/lexical_cast.hpp>



#endif /* PRECOMPILED_H_ */
-----------------------------------------------------------------------------------------------------------------------------------------------------
                
-----------------------------------------------------------------------------------------------------------------------------------------------------
                
-----------------------------------------------------------------------------------------------------------------------------------------------------
 /*
 * main.cpp
 */


#include "precompiled.h"

int main()
{
return 0;
}
-----------------------------------------------------------------------------------------------------------------------------------------------------
                
-----------------------------------------------------------------------------------------------------------------------------------------------------
                
-----------------------------------------------------------------------------------------------------------------------------------------------------


#precompiled.make

C_FLAGS = -O0 -g3 -Wall -c -MMD -MP
INC_PATH = -IC:/docs/boost/boost_1_49_0

all: Precompiled.h.gch

    @echo 'Finished precompiling headers....'

Precompiled.h.gch: Precompiled.h
    @echo 'Building target: $@'
    g++.exe Precompiled.h $(INC_PATH) $(C_FLAGS)

clean:
    rm Precompiled.h.gch

-----------------------------------------------------------------------------------------------------------------------------------------------------
                
-----------------------------------------------------------------------------------------------------------------------------------------------------
                
-----------------------------------------------------------------------------------------------------------------------------------------------------


Eclipse pre-build step to compile the .gch:
make all -C ../inc -f precompiled.make
-----------------------------------------------------------------------------------------------------------------------------------------------------


Can anyone reproduce this? Anyone has some idea how could it be solved?

Thanks,
-- 

*Juhász Ádám*

jadam1212@gmail.com
0036-30-2614731


[Attachment #5 (text/html)]

Hi,<br><br>some time ago I was asking about this issue I had with precompiled \
headers, but I feel my situation was too complex. <br><br>Now I had the time to set \
up a small experiment: basically an empty project with a single header which I try to \
precompile and include it to the single source file.<br> <br>The result is still the \
same: gcc precompiles the header then when it comes to compiling the source file it \
crashes saying &#39;cc1plus.exe has stopped working&#39; (under Win7 64bit Home \
Premium edition).<br><br>To reproduce this you&#39;ll need boost (I have 1.49 here \
installed) and the following files:<br> \
<br>---------------------------------------------------------------------------------- \
-------------------------------------------------------------------<br>--------------- \
--------------------------------------------------------------------------------------------------------------------------------------<br>
                
-----------------------------------------------------------------------------------------------------------------------------------------------------<br>/*<br> \
* precompiled.h<br> */<br><br>#ifndef PRECOMPILED_H_<br>#define PRECOMPILED_H_<br> \
<br>//boost<br><br>#include &lt;boost/lexical_cast.hpp&gt;<br><br><br><br>#endif /* \
PRECOMPILED_H_ */<br>----------------------------------------------------------------- \
------------------------------------------------------------------------------------<br>
                
-------------------------------------------------------------------------------------- \
---------------------------------------------------------------<br>------------------- \
----------------------------------------------------------------------------------------------------------------------------------<br>
 /*<br> * main.cpp<br> */<br><br><br>#include &quot;precompiled.h&quot;<br><br>int \
main()<br>{<br>return \
0;<br>}<br>-----------------------------------------------------------------------------------------------------------------------------------------------------<br>
                
-------------------------------------------------------------------------------------- \
---------------------------------------------------------------<br>------------------- \
----------------------------------------------------------------------------------------------------------------------------------<br>
 <br>#precompiled.make<br><br>C_FLAGS = -O0 -g3 -Wall -c -MMD -MP<br>INC_PATH = \
-IC:/docs/boost/boost_1_49_0<br><br>all: Precompiled.h.gch<br>    <br>    @echo \
&#39;Finished precompiling headers....&#39;<br>    <br>Precompiled.h.gch: \
Precompiled.h    <br>  @echo &#39;Building target: $@&#39;<br>    g++.exe \
Precompiled.h $(INC_PATH) $(C_FLAGS)     <br><br>clean:<br>    rm Precompiled.h.gch   \
<br><br>-----------------------------------------------------------------------------------------------------------------------------------------------------<br>
                
-------------------------------------------------------------------------------------- \
---------------------------------------------------------------<br>------------------- \
----------------------------------------------------------------------------------------------------------------------------------<br>
 <br>Eclipse pre-build step to compile the .gch:<br>make all -C ../inc -f \
precompiled.make<br>------------------------------------------------------------------ \
-----------------------------------------------------------------------------------<br>
 <br>Can anyone reproduce this? Anyone has some idea how could it be \
solved?<br><br>Thanks,<br>-- <br><div><br></div><div><b>Juhász \
Ádám</b><br></div><div><br></div><div><a href="mailto:jadam1212@gmail.com" \
target="_blank">jadam1212@gmail.com</a></div> <div>0036-30-2614731</div><br>



------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://ad.doubleclick.net/clk;258768047;13503038;j?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html

_______________________________________________
MinGW-users mailing list
MinGW-users@lists.sourceforge.net

This list observes the Etiquette found at 
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may \
cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:mingw-users-request@lists.sourceforge.net?subject=unsubscribe



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic