From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thorsten Jolitz Newsgroups: gmane.emacs.help Subject: Re: Ways to use Emacs when programming C++ with Visual Studio? Date: Mon, 27 Oct 2014 09:41:23 +0100 Message-ID: <87y4s1sy4s.fsf@gmail.com> References: <87tx2tfbo6.fsf@gmail.com> <87a94j8s39.fsf@wanadoo.es> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1414401765 4398 80.91.229.3 (27 Oct 2014 09:22:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 27 Oct 2014 09:22:45 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Oct 27 10:22:38 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XigVV-0003bS-Rh for geh-help-gnu-emacs@m.gmane.org; Mon, 27 Oct 2014 10:22:33 +0100 Original-Received: from localhost ([::1]:60213 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XigVV-0002pT-9N for geh-help-gnu-emacs@m.gmane.org; Mon, 27 Oct 2014 05:22:33 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56727) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XigTI-0008NJ-O7 for help-gnu-emacs@gnu.org; Mon, 27 Oct 2014 05:20:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XigTB-0005CF-4i for help-gnu-emacs@gnu.org; Mon, 27 Oct 2014 05:20:16 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:57846) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XigTA-0005As-K0 for help-gnu-emacs@gnu.org; Mon, 27 Oct 2014 05:20:09 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Xifru-0006B8-22 for help-gnu-emacs@gnu.org; Mon, 27 Oct 2014 09:41:38 +0100 Original-Received: from e178189028.adsl.alicedsl.de ([85.178.189.28]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 27 Oct 2014 09:41:38 +0100 Original-Received: from tjolitz by e178189028.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 27 Oct 2014 09:41:38 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 46 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: e178189028.adsl.alicedsl.de User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) Cancel-Lock: sha1:IDcwk15JWAG8VkNqtbKkPA7330w= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:100621 Archived-At: Óscar Fuentes writes: > Thorsten Jolitz 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 That looks easy enough, thanks. >> 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. Thats really good news. Thanks again for the hints. -- cheers, Thorsten