Undefined reference to WinMain (C++ MinGW)

Newer Mingw versions support -municode linker option switching to alternate startup code allowing to use wWinMain instead of WinMain (or wmain instead of main). Add it to your command line, linker options in IDE or makefile. g++ other_options_and_arguments -municode Older versions do not support this option. One thing to note is that Visual C++ supports … Read more

Setting colors for ls in git bash on windows

This is not specifically a git issue but more the shell that you are using. On MINGW32 using Git 2.9+: C:\Program Files\Git\etc\bash.bashrc # Uncomment to use the terminal colours set in DIR_COLORS eval “$(dircolors -b /etc/DIR_COLORS)” C:\Program Files\Git\etc\DIR_COLORS DIR 01;37 # Attribute=bold; Text color=white DIR_COLORS File: # Below are the color init strings for the … Read more

Automake error ‘./ltmain.sh’ not found

In an autoconf/automake/libtool project you need to run: libtoolize: this copies/links a few support scripts, including ltmain.sh (which is the main component of libtool). aclocal: this looks up all m4 macros that your configure script will need, and make a local copy for easier access. autoheader: optional, if you want to use config.h/AC_CONFIG_HEADERS, otherwise all … Read more

msys path conversion (or cygpath for msys?)

Update (Aug-2016): This question is no longer relevant, as msys2 now comes with cygpath in its installation. … I’ll summarize my research here. The cygpath equivalent in MSYS is to use this command: { cd /c/some/path && pwd -W; } | sed ‘s”https://stackoverflow.com/”\\|g’ The problem with this approach is that it requires existing path, e.g. … Read more

ld.exe: cannot open output file … : Permission denied

I had exactly the same problem right after switching off some (in my opinion unneccessary) Windows services. It turned out that when I switched ON again the “Application Experience” everything resumed working fine. May be you simply have to turn on this service? To switch ON Application Experience: Click the Windows start buttonn. In the … Read more

Change the location of the ~ directory in a Windows install of Git Bash

I don’t understand, why you don’t want to set the $HOME environment variable since that solves exactly what you’re asking for. cd ~ doesn’t mean change to the root directory, but change to the user’s home directory, which is set by the $HOME environment variable. Quick’n’dirty solution Edit C:\Program Files (x86)\Git\etc\profile and set $HOME variable … Read more

Git Bash is extremely slow on Windows 7 x64

You can significantly speed up Git on Windows by running three commands to set some config options: git config –global core.preloadindex true git config –global core.fscache true git config –global gc.auto 256 Notes: core.preloadindex does filesystem operations in parallel to hide latency (update: enabled by default in Git 2.1) core.fscache fixes UAC issues so you … Read more

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