可以从命令行编写和编译所有类型的Visual Studio应用程序吗? [英] Can I code and compile all type of Visual Studio Application from Command line?

查看:127
本文介绍了可以从命令行编写和编译所有类型的Visual Studio应用程序吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Emacs作为我的编程环境的第一步。我使用 emacs -nw 在DOS提示符中运行它,并在那里进行开发。这是非常难以置信的,我可以使用Emacs及其Eshell / Shell来编写J2EE和J2ME。



现在关于将其用于Visual Studio开发。
目前,我正在使用Visual C ++ .NET 2008中的一个简单的OpenGL应用程序。
我没有尝试从命令行构建该应用程序,可以吗?



如果在J2EE和J2ME中,我们有build.xml(这是一个ant构建文件),但Visual Studio.NET解决方案中的模拟是什么?



我已经使用命令行编译了一个简单的Visual Studio控制台程序。它的工作原理,但是一套完整的项目?



谢谢!

解决方案

许多评论:


  1. 没有必要使用 -nw ; Emacs适用于Windows。


  2. 模拟到build.xml是xxxxxx.sln,与依赖的项目文件(zzzzzzz.csproj)相结合。当然,用你的解决方案和项目名称替换xxxx和zzzzz。


  3. 您不需要编译eshell或shell。您可以使用 M-x compile 从emacs中运行编译,这通常绑定到一个密钥组合以方便访问。 Mine是 C-xC-e 但我不知道这是一个广泛的惯例或者只是我的选择。


  4. 下一个错误功能可以正常转移到下一个错误,编译器输出。您可能需要一个正则表达式的错误字符串。我使用这个:



    (add-to-list'compilation-error-regexp-alist-alist
    '(msvc^ [\t] EM> \([A-ZA-z0-9\。] [^(] \.\(cpp\ | c\ | h\)\)(\( [0-9] + \))*:+ \(error\ | fatal error\ | | warning\)C [0-9] +:1 3)))


当已经有msvc条目时,您可能需要

 (let((msvcentry(assoc'msvc compilation-error-regexp-alist-alist)))
(当msvcentry
(setcdr msvcentry'(msvc ....)) ))




  1. CEDET。在Windows上,我没有使用带有C ++的CEDET的经验,但是许多人在其他环境中使用了CETC和C ++,代码完成,代码分析等等。


I am in the very first step of using Emacs as my programming environment. I run it in DOS Prompt using emacs -nw and do the development there. It's quite unbelievable, that I can do coding of J2EE and J2ME just using Emacs and its Eshell/Shell.

And now about using it for Visual Studio development. Currently, I am working in a simple OpenGL application using Visual C++.NET 2008. I haven't try to build that application from command line, is it possible?

If in J2EE and J2ME, we had the build.xml (that is an ant build file), but what is the analogue of that in Visual Studio.NET solution?

I already compiled a simple Visual Studio Console program using Command Line. It works, but what about a complete set of project???

Thanks!

解决方案

Lots of comments:

  1. There's no need for you to use -nw; Emacs works fine with windows.

  2. The analogue to build.xml is xxxxxx.sln, combined with the dependent project files, which are zzzzzzz.csproj. OF course replace xxxx and zzzzz with your solution and project names.

  3. you don't need the eshell or shell to compile. You can run the compile from within emacs using M-x compile which is often bound to a key combo for easy access. Mine is C-xC-e but I don't know if that is a broad convention or just my choice.

  4. The next-error function works fine to move point to the next error that is reported in the compiler output. You may need a regex for error strings. I use this:

    (add-to-list 'compilation-error-regexp-alist-alist '(msvc "^[ \t]\([A-Za-z0-9\.][^(]\.\(cpp\|c\|h\)\)(\([0-9]+\)) *: +\(error\|fatal error\|warning\) C[0-9]+:" 1 3)))

When there is already an msvc entry, you may need to

(let ((msvcentry (assoc 'msvc compilation-error-regexp-alist-alist )))
  (when msvcentry 
    (setcdr msvcentry '(msvc ....)))))

  1. CEDET. I don't have any experience using CEDET with C++ on Windows, but many people use CEDET with C++ in other environments, for code completion, code analysis, that sort of thing.

这篇关于可以从命令行编写和编译所有类型的Visual Studio应用程序吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆