Detect compiler used for EXE file
Is there any way to detect (or to hide) the compiler that was used to build an executable file?
![]()
7 Answers 7
- It has a superb GUI and the interface is really intuitive and simple.
- Detection rates are amongst the best given by any other identifier.
- Special scanning modes for advanced detections of modified and unknown files.
- Shell integration, Command line support, Always on top and Drag’n’Drop capabilities.
- Multiple file and directory scanning with recursion.
- Task viewer and controller.
- Plugin Interface with plugins like Generic OEP Finder and Krypto ANALyzer.
- Extra scanning techniques used for even better detections.
- Heuristic Scanning options.
- New PE details, Imports, Exports and TLS viewers
- New built in quick disassembler.
- New built in hex viewer.
- External signature interface which can be updated by the user.
Try the *nix utility strings. Using strings -a foo.exe should produce a pile of results. Redirect to a file and examine in your favorite editor. You may see either a line that directly implicates a specific compiler, such as Borland C++ — Copyright 2002 Borland Corporation. You might only be able to find lines that imply a specific compiler was used, such as in an include path or whatever.
Strings is also available for windows as part of cygwin, or as part of the microsoft sysinternals package.
When this question was asked, PEiD was only a couple of years out of date.


Not free, but IDA Pro has a very nice compiler detection. Not it’s main function of course, but a nice extra.
If you can find a way to examine the first dozen or so bytes of the EXE file, in a hex dump with corresponding ASCII characters displayed, they will usually indicate the compiler used.
How to Check The C++ Compiler Version On Windows

A C or C++ Compiler is a computer program that converts the text of a program’s code into an executable program. How can we check the version of the C++ compiler we are using on our Windows computer? Let’s take a look at a few different ways to do it.
Table of Contents
How can I check the C++ compiler version with the RAD Studio command prompt?
RAD Studio powers C++ Builder which supports various CLANG standards and has its own C++ Compiler, IDE, GUI Designer, and more tools for professional development. If you have installed RAD Studio or C++ Builder, you can take the following steps to check the C++ compiler version.
- Press the Windows key or Start menu on the toolbar
2. Type RAD to find RAD Studio tools.
3. Run RAD Studio Command Prompt
4. This will open Command Prompt with RAD Studio settings in “ C: Program Files (x86) Embarcadero Studio 22.0 bin ” directory (the ’22’ can change depending on the version you have installed.) In this directory, there are different compilers, as listed below.
Here are the C++ compiler binaries included in RAD Studio, C++ Builder.
- bcc32c.exe : Embarcadero C++ Compiler for Win32
- bcc32x.exe : Embarcadero C++ Compiler for Win32
- bcc64.exe : Embarcadero C++ Compiler for Win64
- bccaarm.exe : Embarcadero C++ Compiler for Android
- bcciosarm64.exe : Embarcadero C++ Compiler for iOS 64-bit device
5. You can check versions of these compilers by typing their executable names as shown below.
Как узнать какой компилятор c установлен
This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.
![]()
- ProfileText
- Sign in
Answered by:
Question
Answers
The compiler will predefine some macros that you can detect to determine which compiler you are using.
For example, Microsoft Visual C++ is defining _MSC_VER to a value:
You should be able to make use of something like #ifdef _MSC_VER and #if _MSC_VER > 1400 or whatever your specific needs are.
You can also detect symbols like __WIN32__ to detect if you are in a Windows build environment. Some compilers will define __unix__ or __APPLE__ if your build environment is of that variety.
Finding version of Microsoft C++ compiler from command-line (for makefiles)
I must be missing something really obvious, but for some reason, the command-line version of the Microsoft C++ compiler (cl.exe) does not seem to support reporting just its version when run. We need this to write makefiles that check the compiler version a user of our tool has installed (they get makefiles with code they are to compile themselves locally, so we have no control over their compiler version).
In gcc, you just give the option -v or —version to get a nice version string printed.
In cl.exe, you get an error for -v.
I have read the MSDN docs and compiler online help, and I cannot find the switch to just print the compiler version. Annoyingly, you always get the version when the compiler starts. but you seem not to be able to start the compiler just to get the version out of it.
Finding compiler vendor / version using qmake seemed similar, but only deals with the simple case of gcc.
I am trying this with VC++ Express 2005, if that matters. I hoped it would not, as detecting the compiler version is best done in a compiler-version-independent way 🙂