Solving random crashes

Try Valgrind (it’s free, open-source): The Valgrind distribution currently includes six production-quality tools: a memory error detector, two thread error detectors, a cache and branch-prediction profiler, a call-graph generating cache profiler, and a heap profiler. It also includes two experimental tools: a heap/stack/global array overrun detector, and a SimPoint basic block vector generator. It runs … Read more

What configure options were used when building gcc / libstdc++?

gcc -v prints out the configuration options among other stuff: $ gcc -v Using built-in specs. Target: i686-pc-cygwin Configured with: /gnu/gcc/releases/packaging/4.3.4-3/gcc4-4.3.4-3/src/gcc-4.3.4/ configure –srcdir=/gnu/gcc/releases/packaging/4.3.4-3/gcc4-4.3.4-3/src/gcc-4.3. 4 –prefix=/usr –exec-prefix=/usr –bindir=/usr/bin –sbindir=/usr/sbin –libex ecdir=/usr/lib –datadir=/usr/share –localstatedir=/var –sysconfdir=/etc –inf odir=/usr/share/info –mandir=/usr/share/man –datadir=/usr/share –infodir=/usr /share/info –mandir=/usr/share/man -v –with-gmp=/usr –with-mpfr=/usr –enable -bootstrap –enable-version-specific-runtime-libs –with-slibdir=/usr/bin –libe xecdir=/usr/lib –enable-static –enable-shared –enable-shared-libgcc –disable -__cxa_atexit –with-gnu-ld … Read more

Serial Port (RS -232) Connection in C++

Please take a look here: RS-232 for Linux and Windows 1) Windows Serial Port Programming 2) Using the Serial Ports in Visual C++ 3) Serial Communication in Windows 1) You can use this with Windows (incl. MinGW) as well as Linux. Alternative you can only use the code as an example. 2) Step-by-step tutorial how … Read more

Linking to MSVC DLL from MinGW

You can’t do this. They have exported C++ classes from their dll, rather than C-functions. The difference is, c++ functions are always exported with names in a mangled form that is specific to a particular version of the compiler. Their dll is usable by msvc only in that form, and will probably not even work … Read more

Combining mingw and git

Small update: Since the Git 2.x releases, Git for Windows is based off of MSYS2 and available in 32 and 64 bit binary form. It still is a fork, and not interchangeable with the real MSYS2. One thing you must understand: msysgit (the git you are using) is a fork of msys with added git … Read more

Cygwin: How to actually use gcc-mingw

As you already found, you can use gcc-3 with -mno-cygwin. The other possibility is to install the 32-bit and/or 64-bit toolchains from the MinGW-w64 project, which have been packaged for Cygwin very recently and hence are available through setup.exe now. Don’t be put off by the rather confusing executable names: i686-w64-mingw32-gcc is the 32-bit compiler … Read more

permission denied when sed in place edit in mingw

It’s caused by Windows security settings. Open the folder’s Properties settings from the context menu. In the Security tab, click Edit, press Add… in the pop-up window and add your user to the list, check Full Control in the Allow column. Press OK twice to apply the changes.