User forums > General (but related to Code::Blocks)

TDM's unofficial GCC 4.2.0 for MinGW (now with OpenMP, Fortran and Obj-C)

<< < (13/22) > >>

stahta01:
From

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27067

--- Quote ---Compile errors with multiple inheritance where the stdcall attribute is applied to virtual functions.

--- End quote ---

Tim S

madd:
Great work, TDM, btw.

I got 4.2 to work, but is requires the following (for a simple hello world using iostreams):


--- Code: ---C:\tmp>g++ -IC:\mingw\lib\gcc\mingw32\4.2.0\include -IC:\mingw\include\c++\4.2.0
 -LC:\mingw\lib\gcc\mingw32\4.2.0 -IC:\mingw\include\c++\4.2.0\mingw32 -ofoo foo
.cpp

--- End code ---

Why the need for the include / lib paths? I'm pretty sure gcc 3.4.5 could find those dirs by itself.

Also the resulting exe is ~1.7MB.  I assuming this is because everything is linked in statically?

TDragon:
As Tim mentioned, I used the patch for PR 27067.


--- Quote from: madd on July 05, 2007, 06:04:18 pm ---Why the need for the include / lib paths? I'm pretty sure gcc 3.4.5 could find those dirs by itself.

--- End quote ---
They shouldn't be needed. Are you using an older release than tdm-3? Can you post the output from adding "-v" to the command line? Have you tried installing all packages individually into a clean directory?


--- Quote from: madd on July 05, 2007, 06:04:18 pm ---Also the resulting exe is ~1.7MB.  I assuming this is because everything is linked in statically?

--- End quote ---
The C++ runtime is linked in statically, yes. If you additionally use some optimization such as "-O2" (for speed) or "-Os" (for size), and the "-s" flag (for "strip"), you'll get a much smaller executable.

madd:
Stripping makes it 500KB.  Still pretty big..

It does seem to complain about non existing dirs. Perhaps it is a vista issue?



--- Code: ---C:\tmp>g++ -v -IC:\mingw\lib\gcc\mingw32\4.2.0\include -IC:\mingw\include\c++\4.
2.0 -LC:\mingw\lib\gcc\mingw32\4.2.0 -IC:\mingw\include\c++\4.2.0\mingw32 -ofoo
foo.cpp
Using built-in specs.
Target: mingw32
Configured with: ../gcc-4.2.0/configure --prefix=/extra/crossgcc/win-gcc --build
=i686-pc-linux-gnu --host=mingw32 --target=mingw32 --enable-languages=c,c++ --wi
th-as=/extra/crossgcc/cross-gcc/bin/mingw32-as --with-ld=/extra/crossgcc/cross-g
cc/bin/mingw32-ld --disable-shared --with-gcc --with-gnu-as --with-gnu-ld --disa
ble-debug --disable-nls --enable-threads=win32 --disable-win32-registry --enable
-sjlj-exceptions --enable-fully-dynamic-string --disable-libstdcxx-pch --with-mt
une=i686 --enable-libgomp
Thread model: win32
gcc version 4.2.0
 cc1plus -quiet -v -IC:\mingw\lib\gcc\mingw32\4.2.0\include -IC:\mingw\include\c
++\4.2.0 -IC:\mingw\include\c++\4.2.0\mingw32 -iprefix c:\tmp\../lib/gcc/mingw32
/4.2.0/ foo.cpp -quiet -dumpbase foo.cpp -mtune=i386 -auxbase foo -version -o ./
ccfAj9ge.s
ignoring nonexistent directory "c:/tmp/../lib/gcc/mingw32/4.2.0/../../../../incl
ude/c++/4.2.0"
ignoring nonexistent directory "c:/tmp/../lib/gcc/mingw32/4.2.0/../../../../incl
ude/c++/4.2.0/mingw32"
ignoring nonexistent directory "c:/tmp/../lib/gcc/mingw32/4.2.0/../../../../incl
ude/c++/4.2.0/backward"
ignoring nonexistent directory "c:/tmp/../lib/gcc/mingw32/4.2.0/../../../../incl
ude"
ignoring nonexistent directory "c:/tmp/../lib/gcc/mingw32/4.2.0/include"
ignoring nonexistent directory "c:/tmp/../lib/gcc/mingw32/4.2.0/../../../../ming
w32/include"
ignoring nonexistent directory "/extra/crossgcc/win-gcc/include/c++/4.2.0"
ignoring nonexistent directory "/extra/crossgcc/win-gcc/include/c++/4.2.0/mingw3
2"
ignoring nonexistent directory "/extra/crossgcc/win-gcc/include/c++/4.2.0/backwa
rd"
ignoring nonexistent directory "/extra/crossgcc/win-gcc/include"
ignoring nonexistent directory "/extra/crossgcc/win-gcc/include"
ignoring nonexistent directory "/extra/crossgcc/win-gcc/lib/gcc/mingw32/4.2.0/in
clude"
ignoring nonexistent directory "/extra/crossgcc/win-gcc/mingw32/include"
#include "..." search starts here:
#include <...> search starts here:
 C:/mingw/lib/gcc/mingw32/4.2.0/include
 C:/mingw/include/c++/4.2.0
 C:/mingw/include/c++/4.2.0/mingw32
 /mingw/include
End of search list.
GNU C++ version 4.2.0 (mingw32)
        compiled by GNU C version 4.2.0.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 18066f79fca492234e5b690bbee1824d
 as -o ./cc4T7CrJ.o ./ccfAj9ge.s
 ld -Bdynamic -ofoo.exe /mingw/lib/crt2.o -LC:\mingw\lib\gcc\mingw32\4.2.0 -L/mi
ngw/lib ./cc4T7CrJ.o -lstdc++ -lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt -lus
er32 -lkernel32 -ladvapi32 -lshell32 -lmingw32 -lgcc -lmoldname -lmingwex -lmsvc
rt

--- End code ---

It is clean install using mingw-runtime-3.12.tar.gz, w32api-3.9.tar.gz, binutils-2.17.50-20070129-1.tar.gz, mingw-utils-0.3.tar.gz and gcc-4.2.0-tdm-3-omp.7z.





blahhh:
Once again. Why don't you guys use a vanilla gcc 4.2.0? It works out of the box for me as a mingw compiler.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version