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

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

<< < (5/22) > >>

stahta01:
FYI:

This is my Windows XP Batch file I use to get setting of my minGW Setups.
Adjust set MINGWBASEDIR= to your minGW install folder.

version-of-mingw.bat

--- Code: ---::
:: Display the current version of GCC, NASM, ld, make and others.
::
@echo off
set MINGWBASEDIR=C:\apps\gcc-4.2.0-tdm-1
SET PATH=%MINGWBASEDIR%\bin;%SystemRoot%\system32
gcc -v 2>&1 | find "gcc version"
REM nasm -v
ld -v
windres --version | find "GNU windres"
mingw32-make -v | find "GNU Make"
type "%MINGWBASEDIR%\include\_mingw.h" | find "#define __MINGW32_VERSION"
type "%MINGWBASEDIR%\include\w32api.h" | find "__W32API_VERSION"

PAUSE

--- End code ---

Output on my Computer


--- Code: ---gcc version 4.2.0
GNU ld version 2.17.50 20060824
GNU windres 2.17.50 20060824
GNU Make 3.80
#define __MINGW32_VERSION 3.11
#define __W32API_VERSION 3.7
Press any key to continue . . .

--- End code ---

snija:
../libgomp/configure --program-suffix=-4.2 --host=i686-pc-mingw32 --build=i686-pc-linux-gnu --target=i686-pc-mingw32 --prefix=/mingw --enable-optimize --enable-threads=win32 --disable-nls --disable-win32-registry --enable-static --without-x

TDragon:
@patlecat:
The problem is in your compiler settings in Code::Blocks, apparently. The (correct) default is for it to use mingw32-g++.exe to link your program: the g++ driver ensures that necessary libraries for C++ programs are linked in, whereas the gcc driver requires them to be linked explicitly. Since I don't know what other changes you've made, I would like it best if you could completely reset your compiler settings in C::B. If that's not an option for you, at least make sure that, as mentioned above, mingw32-g++.exe is being used rather than mingw32-gcc-4.2.0.exe.

@snija:
Thanks for the info! I will probably attempt a libgomp build tomorrow, along with GFortran and GCJ. If it goes smoothly, I'll find a way of making it available.

@heromyth:
The issue that you mentioned is certainly present in many other unofficial builds, but I've taken pains to guarantee that it is not the case for mine! (If it were the case, no one would be able to use this build, because it was built in "/extra/crossgcc" a Linux environment!) You can feel free to install it anywhere, and call it from anywhere.

patlecat:

--- Quote from: TDragon on May 20, 2007, 05:58:07 am ---@patlecat:
The problem is in your compiler settings in Code::Blocks, apparently. The (correct) default is for it to use mingw32-g++.exe to link your program: the g++ driver ensures that necessary libraries for C++ programs are linked in, whereas the gcc driver requires them to be linked explicitly. Since I don't know what other changes you've made, I would like it best if you could completely reset your compiler settings in C::B. If that's not an option for you, at least make sure that, as mentioned above, mingw32-g++.exe is being used rather than mingw32-gcc-4.2.0.exe.
--- End quote ---
AHHHH you're a genius man :P That worked, it compiles! I'm not accustomed to the GCC suite, yet. Unfortunately now the program wont run and I have this system error:

--- Code: ---The procedure entry point _ctype count not be located in the dynamic link library msvcr71.dll
--- End code ---
(I have VC2k3 installed so msvcr71.dll is installed on my pc)

And if I may also ask about the linker error I have when I try to compile the default wxWidgets project? There I get this error:

--- Code: ---cc1plus.exe: warning: ./wx_pch.h.gch/Debug_wx_pch_h_gch: created by a different GCC executable
Linking executable: bin\Release\wixTest3.exe
h:/mingw/bin/../lib/gcc/mingw32/4.2.0/../../../../mingw32/bin/ld.exe: cannot find -lwxmsw28
collect2: ld returned 1 exit status

--- End code ---
(I've had this problem from the beginning, a few weeks ago, when I first installed a nightly build of CB. And yes, both wxWidgets and this test program were built with the same compiler suite.)

PS: I've rebuilt/cleaned both projects several times


@TimS_: Kool script man, thanx. I've gotten this out of it:

--- Code: ---gcc version 4.2.0
GNU ld version 2.17.50 20060824
GNU windres 2.17.50 20060824
GNU Make 3.81
#define __MINGW32_VERSION 3.11
#define __W32API_VERSION 3.7
Press any key to continue . . .
--- End code ---

patlecat:

--- Quote from: patlecat on May 20, 2007, 09:33:53 am ---AHHHH you're a genius man :P That worked, it compiles! I'm not accustomed to the GCC suite, yet. Unfortunately now the program wont run and I have this system error:

--- Code: ---The procedure entry point _ctype count not be located in the dynamic link library msvcr71.dll
--- End code ---

--- End quote ---
This problem was solved by installing mingwRuntime 3.11, like TimS suggested, thanks Tim :P


BTW TDragon, why didn't u use 3.12? Is it buggy?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version