Embedding binary blobs using gcc mingw

In your C program remove the leading underscore: #include <stdlib.h> #include <stdio.h> extern char binary_input_txt_start[]; int main (int argc, char *argv[]) { char *p; p = binary_input_txt_start; return 0; } C compilers often (always?) seem to prepend an underscore to extern names. I’m not entirely sure why that is – I assume that there’s some … Read more

Enable native NTFS symbolic links for Cygwin

⸻⸻  Short answer  ⸻⸻ Define environment variable: CYGWIN=winsymlinks:nativestrict As pointed out by mwm you may also have to go to the settings or to run bash as Administrator. See the Notes section. ⸻⸻  Long answer  ⸻⸻ Default Cygwin symlinks are just regular files By default Cygwin creates text files as workaround for Windows symlink flaw. … Read more

CreateProcess: No such file or directory

According to Code::Blocks wiki, you need to add C:\MinGW\libexec\gcc\mingw32\MinGW-Version to your PATH. There is no need to restart, but you need to open another terminal in order to get the newest PATH settings. For MinGW-w64, that’s <mingw install directory>\libexec\gcc\x86_64-w64-mingw32\4.7.0\

A simple explanation of what is MinGW

MinGW is a complete GCC toolchain (including half a dozen frontends, such as C, C++, Ada, Go, and whatnot) for the Windows platform which compiles for and links to the Windows OS component C Runtime Library in msvcrt.dll. Rather it tries to be minimal (hence the name). This means, unlike Cygwin, MinGW does not attempt … Read more

how to do static linking of libwinpthread-1.dll in mingw?

If your toolchain includes the static winpthreads, adding the option -static Will pull in static versions of all libraries it can. Alternatively, you can remove libwinpthread.dll.a and the DLL itself from the toolchain directories. This might mess up programs linking with libstdc++ and libgcc DLLs though, so be careful. A third option is to use … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)