Hi all,

i have solved my problem by using the executable of Dev-C++ only and pointing all compiler, linker, lib, include or other pathes to the latest release of Mingw32. I then added -lgdi32 to the compiler command and to the linker command.

This has solved the problem.

Dev-C++ uses an old MinGW release which is not maintained anymore and obviously had bugs or compatibility issues.

Best regards,

Harm-Jan Zwinderman wrote:

I experienced a similar error when building a dll.

I managed to file the bugreport at:

For the record my errorreport is at number 2475607

I managed to circumvent the segmentation fault by removing inlined code.

Kind regards,
Harm-Jan Zwinderman

2009/3/25, aphesa <adarmont_ml@aphesa.com>:
Hi all,

i get the exact same bug using CImg. It seems that the compiler is doing
something wrong with this file because i only get it with the CImg library.
Note that the libraries compiles fine under linux. I'm using the g++
compiler with MinGW in Dev-C++. Here are the details of the configuration,
and i used the latest release of CImg. I did not forget -lgdi32 in the
compiler command line to compile CImg.


Microsoft Windows Vista Professional [Version 6.0.6001]

D:\Program Files\MinGW\bin>g++ -v
Reading specs from ../lib/gcc/mingw32/3.4.5/specs
Configured with: ../gcc-3.4.5-20060117-3/configure --with-gcc --with-gnu-ld
th-gnu-as --host=mingw32 --target=mingw32 --prefix=/mingw --enable-threads
able-nls --enable-languages=c,c++,f77,ada,objc,java --disable-win32-registry
isable-shared --enable-sjlj-exceptions --enable-libgcj --disable-java-awt
out-x --enable-java-gc=boehm --disable-libgcj-debug --enable-interpreter
e-hash-synchronization --enable-libstdcxx-debug
Thread model: win32
gcc version 3.4.5 (mingw-vista special r3)

GNU ld version 2.17.50 20060824

I have tried two different software using CImg, they give the same failure.

Here is the command line used to invoke the compiler on the file containing
the CImg include, together with the full log of the error:

Compiler: Default compiler
Building Makefile:
Executing  make...
make.exe -f "D:\EMVA1288\Standard_software\Bloc3_core_dll\Makefile.win" all
g++.exe -c processing.cpp -o processing.o
-I"D:/Dev-Cpp/include/c++/3.4.2/mingw32"  -I"D:/Dev-Cpp/include/c++/3.4.2"
-I"D:/Dev-Cpp/include"  -DBUILDING_DLL=1  -lgdi32

In file included from processing.h:26,
                 from processing.cpp:27:
CImg.h: In member function `cimg_library::CImg<T>&
cimg_library::CImg<T>::draw_triangle(int, int, int, int, int, int, const
tc*, float, float, float, float)':
CImg.h:20440: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.mingw.org/bugs.shtml> for instructions.

make.exe: *** [processing.o] Error 1

Execution terminated

Note that the page http://www.mingw.org/bugs.shtml does not exist, so don't
tell me to go there.

Last things to mention:
1) the source can be found at http://code.google.com/p/emva1288/
2) we are building a dll but it does not make any difference with an exe

Best regards,

View this message in context:
Sent from the MinGW-users mailing list archive at Nabble.com.

Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
MinGW-users mailing list

This list observes the Etiquette found at
We ask that you be polite and do the same.

Most annoying abuses are:
1) Top posting
2) Thread hijacking
3) HTML/MIME encoded mail
4) Improper quoting
5) Improper trimming
You may change your MinGW Account Options or unsubscribe at: