User Tools

Site Tools


msysmingw:start

Msys & MinGW Tips

—-

Capturing the output from make: make &> /tmp/make.log

Setting non-default Home directory

I'm using msys on Windows XP, and for some reason it thinks my ~
directory is C:/msys/1.0/home/janssen. Is there some way I can get
it to use what Windows thinks is my home directory?

Simply set the HOME environment variable in the windows environment
before starting MSYS.

More precise - set it in /etc/profile
Something like

if [ -z "$HOME" -o ! -d "$HOME" ]; then
    HOME="$USERPROFILE"
fi 

rxvt discussion

rxvt is intended to be a slimmed-down replacement for xterm, and so is fairly unnecessary for most applications of Msys. Consequently I should tend to run

msys.bat --norxvt

See here

msys list online

Discover your compiler defined macros with

gcc -dM -E - < /dev/null
or on Windows..
gcc -dM -E - < NUL

Mixing Compilers (and runtimes) See article here


Alternative (Twilight Dragon Media - TDM) Mingw Build which is proving popular.


My home Msys profile


Emacs in Msys

I find they work well together anyway. It is true that Emacs doesn't 
understand the /c/ style path prefix but in practice this doesn't seem 
to cause me any problems. You need to start Emacs from MSYS so that it 
is running in an MSYS shell. I have the following in my ~/.profile:

export PATH=/c/emacs-23.1/bin/:$PATH
export SHELL=sh
export EDITOR=emacsclient

With this setup I can just run emacs from the shell:

$ emacs

With the standard Emacs configuration I can compile, debug, run a shell, 
etc. Filesystem access uses Windows paths, but these tools seem to 
handle the changeover correctly.

—-
windres is completely separate from the preprocessor, linker, etc. You must call windres separately. If you want to add resources to your .exe, you must:

1) compile your source file(s) to .o with g++
2) compile your .rc file to .o with windres
3) link all the object files to make an executable with g++.


msysmingw/start.txt · Last modified: 2020/04/08 00:23 (external edit)