Author Topic: Batch file that displays minGW GCC Info.  (Read 3767 times)

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Batch file that displays minGW GCC Info.
« on: May 20, 2007, 04:35:13 pm »
FYI:

I have created/Edited an batch file that displays information about your minGW setup.
Note, credit to Peter Ward work in ReactOS Build Environment RosBE.cmd it gave me a starting point that I edited.

Usage: For windows that support %CD%, just copy to the minGW folder; the standard folder is C:\MinGW
For windows that do NOT support %CD%, comment out line "set MINGWBASEDIR=%CD%" and uncomment "REM set MINGWBASEDIR=C:\MinGW" and update the value of "C:\MinGW" to your minGW folder.

Tim S

version-of-mingw.bat
Code
@echo off
REM credit to Peter Ward work in ReactOS Build Environment RosBE.cmd it gave me a starting point that I edited.
::
:: Display the current version of GCC, ld, make and others.
::
REM %CD% works in Windows XP, not sure when it was added to Windows
REM set MINGWBASEDIR=C:\MinGW
set MINGWBASEDIR=%CD%
SET PATH=%MINGWBASEDIR%\bin;%SystemRoot%\system32
ECHO %MINGWBASEDIR%
gcc -v 2>&1 | find "gcc version"
REM nasm -v
ld -v
windres --version | find "GNU windres"
mingw32-make -v | find "GNU Make"
ECHO "The minGW runtime version is the same as __MINGW32_VERSION"
type "%MINGWBASEDIR%\include\_mingw.h" | find "__MINGW32_VERSION" | find "#define"
type "%MINGWBASEDIR%\include\w32api.h" | find "__W32API_VERSION"

PAUSE

Example output below.

Code
C:\apps\MinGW_GCC_3.4.5_API_3_8_MSys
gcc version 3.4.5 (mingw special)
GNU ld version 2.16.91 20060119
GNU windres 2.16.91 20060119
GNU Make 3.80
"The minGW runtime version is the same as __MINGW32_VERSION"
#define __MINGW32_VERSION 3.11
#define __W32API_VERSION 3.8
Press any key to continue . . .
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