[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Ways to use Emacs when programming C++ with Visual Studio?
From: |
Óscar Fuentes |
Subject: |
Re: Ways to use Emacs when programming C++ with Visual Studio? |
Date: |
Sun, 26 Oct 2014 03:47:38 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
Thorsten Jolitz <tjolitz@gmail.com> writes:
[snip]
> - emacs can be used (after setting quite a lot of environmental
> variables) to interact with the MSVS C++ compiler via the cmd line
VS comes with batch files for setting those environment variables. You
can write a .bat that takes an arbitrary number of arguments, executes
the VS .bat that sets the environment variables and then executes those
arguments as a command. This is mine:
rem vc2013.bat
@call "c:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\vcvars32.bat"
%*
>From Emacs you do
M-x compile vc2013.bat <command>
> I'm really new to this C++ thing, so I would appreciate some tips about
> this topic, what can be done, what not, what is the state-of-the-art
> (some prominent links I found are really old, like 10 years or so,
> talking about Emacs 19...)?
>
> Are there actually C++ teams with both Emacs and Visual Studio users? I
> could imagine that e.g. in a Scala (SBT or Maven) project some
> programmers use Eclipse, others Emacs ENSIME, and they can happily
> co-exist, but would a similar co-existance be possible in a C++ project
> on Windows with Emacs and Visual Studio?
Absolutely. I only use the VS IDE for debugging (which seldom happens.)
99% of the time is coding and everything is done from Emacs. You can use
CMake too, that creates VC project files, makefiles, etc from the same
build specification.