Emacs for Windows to configure C ++ development?

Has anyone configured cygwin and some emacs to work well under 64-bit Windows 7?

I recently tried downloading cygwin, and by default it doesn’t even work reliably, there are odd shell invitation characters, I get a lot of warnings, in one case Cc was read as Cg and caused various errors. (Neither xemacs nor emacs worked for me, where "work" I mean that work in the spirit and shell and without warnings).

I just want the regular emacs development tools: gdb-mode, shell-mode, compiling, tag-search to work fine.

I was hoping that someone who recently did this with cygwin could share any relevant shell files, emacs files, environment variables, etc., so that it all works. Should all this just work out of the box?

+4
source share
3 answers

You should check ntemacs, with this code in your .emacs everything works fine with cygwin:

;; -- sets up cygwin (let* ((cygwin-root "c:/cygwin") (cygwin-bin (concat cygwin-root "/bin"))) (when (and (eq 'windows-nt system-type) (file-readable-p cygwin-root)) (setq exec-path (cons cygwin-bin exec-path)) (setenv "PATH" (concat cygwin-bin ";" (getenv "PATH"))) (setq shell-file-name "bash") (setenv "SHELL" shell-file-name) (setq explicit-shell-file-name shell-file-name) (add-hook 'comint-output-filter-functions 'comint-strip-ctrl-m))) 
+1
source

I use Frankenstein's disgusting combination of "native" Win32 emacs ( http://alpha.gnu.org/gnu/emacs/pretest/windows/emacs-23.1.97-bin-i386.zip is the latest, but I am using an older version) and Cygwin - for bash, find, etc. It took me years to customize everything to my taste, and it's still a pretty bumpy experience.

In any case, it’s worth a try.

0
source

I am using a direct clean install of Emacs, gcc, gdb, make, etc. from Cygwin (currently 1.7.15, but I have been doing this for many years) and my standard dotfiles (.emacs, .bashrc / .bash_profile) that have been modified (but not very much) to be portable on Linux and Cygwin, and everything works fine for me. Sometimes I encounter problems (for example, with process2-mode , where Processing does not yet have a Cygwin package, so it wants its own Windows paths, but it is quite easily fixed and unusual. It almost sounds to me like something fundamentally broken in your setup, could you give more detailed information? Otherwise, all I can recommend is to erase and perform a clean reinstall.

0
source

Source: https://habr.com/ru/post/1309498/


All Articles