What does TDM stand for in "TDM-gcc"? - gcc

I have searched for this for many site and failed. But what does TDM stand for in "TDM-gcc"? It confuses me when I want to choose gcc as the compiler. So, what's the difference? Should I choose TDM or NON-TDM? Or is TDM only for minGW on Windows platform?
The official TDM-gcc site don't even explain it...

TDM-GCC is a GCC distribution on Windows. TDM stands for Twilight Dragon Media, the project's name.
Since you want GCC on Windows, you've 3 popular options
Mingw-w64
MinGW
TDM-GCC
Also choose the right exception and threading model. Details: What is difference between sjlj vs dwarf vs seh? and mingw-w64 threads: posix vs win32.
If you not only want GCC but also a Unix-like shell with all the bin, core and findutils, you may use Cygwin or the lighter MSYS2. I personally prefer the latter; it also has a package manager and you get frequent updates for the packages installed.

Related

Setting up QtCreator cross compiler for ARM on Windows

I need to develop Qt and command line software for the BeagleBone Black and Raspberry Pi-2. Ideally I wish to use QtCreator as I am accustomed to it, but in any case I need to use QtDesigner for GUI work.
I have spent days trawling through articles, going around in circles and getting nowhere.
The Raspberry Pi-2 has Raspbian/Jessie installed together with Qt 5.2.3. I can design, compile and run Qt desktop applications on this. Of course compilation is slow and not really usable for development work.
To try and keep matters simple, I downloaded qt-opensource-windows-x86-android-5.3.2.exe and installed that on my Windows 7 (64-bit) system. My belief is that this Qt install is the same version as the Qt on the Pi-2 and already contains the ARM7 library files required for cross-compiling. All that should be needed is a cross-compiler for Windows/ARM?
Windows/QtCreator complained in Tools > Options > Qt Versions about the Qt 5.3 for Android armv7 stating "No compiler can produce code for this Qt version...".
For a Windows/ARM cross-compiler I downloaded and installed Yagarto (yagarto-bu-2.23.1_gcc-4.7.2-c-c++_nl-1.20.0_gdb-7.5.1_eabi_20121222.exe). I figured I then just need to set the QtCreator compiler path in Tools > Options > Compilers and then things would start working. This is not the case.
Clearly I am missing something important and have managed to become confused by the number of not-quite-relevant articles I have read.
Is Yagarto the cross-compiler I need in this situation?
How do I define the compiler in QtCreator and get rid of the error?
Is there an easier way to set-up this stuff?
Thank you.
Details:
QtCreator 3.2.1 (Qt 5.3.2)
Windows 7 64-bit service pack 1
Edit:
I have just tried again using the GCC ARM Embedded ToolChain and GNU Make for Windows. The result is the same in that I cannot seem to configure the settings for QtCreator ARM7 and make it happy.

What's the difference between Mingw32 and Mingw64 include files?

I used Mingw32 and devc++ IDE to develop my application. I included the lib files and include files of Mingw32 and compiled my application.
My application should run in both 32 bit and 64 bit versions of windows. My doubt here is whether my application run in windows 64 bit system? Even if it works perfectly will there be any problem?
What is the difference between Mingw32 and Mingw64 include files? My ultimate aim is to run my application both in 32-bit and 64-bit windows. What include files should I add and compile?
mingw-w64 is fork of the mingw project.
Generally the mingw-w64 headers are much more complete, they include more recent additions from newer Windows (new SDK headers, function declarations, types, constants, macros), are ready for building 64-bit targets (when used with gcc capable of that).
Note of course that you cannot mix mingw's gcc with mingw-w64 headers or vice versa. You have to use complete toolchain from one or the other. I don't know how easy it is to switch toolchain in the devc++ (I don't use it).

Link GCC libraries statically (libgcc and libstdc) on Windows

I am using Mingw environment, GCC compiler and Code::Blocks IDE to create an application that is supposed to work on different Windows versions, without the need of installing any other software. So, I am using the last version of GCC.
I have created the EXE on a Windows 7 and it works perfectly. I moved it on a Windows XP (recently installed, no .NET, no C++ redistributable, no gcc dlls and it asked me for the libgcc_s_dw2-1.dll and for the libstdc++-6.dll. They couldn't be found on the XP computer. With an older version of GCC this didn't happen.
So, I copied those two libraries inside the same folder as the executable. Now, it also worked on the XP.
What I would like is to link both libraries statically. I added the -static option to GCC but it looks like I don't have the static libraries, only the dynamic ones, so I wonder if somebody can tell me where can I download them from and how would I link them.
Thanks so much!

Windows Qt with MinGw or Visual Studios?

I am trying to compile qt, and am faced with two choices whether use MinGw or Visual Studio compiler? What is the difference between them, and are there any advantages/disadvantages of using one or the other?
They are both fine tools. The important thing to know is that they don't necessarily play well together. That is, as you link libraries together, they must all use the same tool chain. For this reason, in my opinion, it is better to use the Visual Studio compiler (MSVC), as it is the "first class citizen" on Windows; the others are treated somewhat as second class.
What I mean is that you can pretty much count on third party libraries being available in binary form using MSVC, or at least build instructions being available using MSVC. We had lots of problems with third-party libraries not being able to build in MinGW or having nonexistent build instructions and having to do a lot of manual Makefile editing, etc. You are much more likely to have things "just work" if using MSVC.
That is just our experience (we started with MinGW); your mileage may vary.
MinGW uses GCC, and GCC has one significant advantage to MSVC - it is portable. MSVC is limited to Microsoft platforms, GCC supports pretty much everything, including 8bit embedded CPUs. Meaning that you can use the same directives and compile extensions across different platforms.
Also, MinGW is compact, quick to install, and a version is even bundled with Qt. Unlike MSVC, which is not even available standalone, you have to install visual studio, which itself installs a bunch of garbage you don't need but can't opt out of.
UPDATE
It is now possible to get the MS compiler without VS, a.k.a MS Build Tools. Also, If you want to build chromium (a.k.a the QtWebEngine) for windows you have to use MSVC, that's a limitation imposed by google, as they only support building with the platform-native compiler.
Last but not least, you can get MSYS2, which has a repository with MinGW and a ton of ready to use static and dynamic libraries build for it, so you can avoid the arduous and often failure prone build process.
UPDATE
Just for the sake of reference, for VS build tools 2019, the C++ compiler alone takes up about 4.5 gigabytes of space, or about 8 if you just click "C++ build tools" and leave it at the default. For comparison, GCC 9.x is about 150 mb. In fact, the MSVC compiler alone is larger than the entire extensive collection of packages that I adopted for use throughout the years, plus their dependencies, for a total of over 200 packages. Additionally, I'd say MSYS had packages for about 98% of the libraries and tools I've found myself in need of, and those remaining 2% include libraries it had but were not configured in a way, suitable for my use case. And it goes without saying, the packet manager makes it trivial to keep versions up to date.

GNU CC and Windows

I'm a bit confused about the options for using GNU CC on Windows.
If I want to primarily develop console applications (as opposed to GUI apps) what do I need? Where do Cygwin and MinGW figure? For example, if I use the NetBeans IDE C/C++ option, that requires installation of Cygwin.
Are there any options which would allow Console application development without Cygwin?
Both MinGW & Cygwin give you the gcc compiler but if you use MinGW you don't need to install Cygwin because it uses native Windows libraries rather than Cygwin libraries
Cygwin is more than just compilers, it tries to provide a UNIX programming environment by building a lot of UNIX libraries on top of Windows SDK.
You could install CodeBlocks IDE oder DevCPP ide. If you do not require special posix api's then you do not need to install cygwin.
You really really should check out Visual C++ Express. It makes developing on windows A LOT easier. I it is free and the Visual C++ is the preferred way to develop windows apps. ANd yes, you can make console applications too.
That clarifies things. I'm not particularly interested in a *nix-like environment. I was more interested in getting a GNU C compiler that conforms closely with C99 (which I believe the latest GCC compiler does) and using it as a C learning exercise (hence console rather than GUI apps)
It appears to me that NetBeans IDE/Cygwin option installs an earlier version of the compiler.
So, it appears that MinGW is what I am looking for if I want to use GNU C. Incidentally, the free Pelles C compiler/IDE has a very full C99 implementation.
You can use vc express for concole apps if you wish, or really any compiler for win platform.
MinGW can support many languages as well as GNU C Compiler. It also comes with msys package that you can simulate UNIX environment. Cygwin does the same thing as msys does. I'd advice you to install MinGW with full msys support.

Resources