c++ - 在 Emacs 中使用 Visual Studio 6 C++ 编译器

标签 c++ visual-studio emacs visual-c++-6

我刚刚开始使用 C++ 开发,我想使用 emacs 编写代码,然后使用 visual studio 6 编译器在 emacs 中编译和运行它。我已经用谷歌搜索了一下,但似乎无法找到有关如何完成的解释。 有什么指点吗?

谢谢你的帮助,

乔格

最佳答案

在过去的几年里,我理所当然地这样做了。有两种方法可以做到这一点:

  1. 在旧版本的 VS(包括 VS 6.0)中,有一个按钮可以导出项目的 nmake 文件。我偶尔会这样做,然后使用 nmake 进行编译。我有

    (setq compile-command "nmake debug ")

    为此在我的 .xemace/init.el 中。您必须添加 nmake 文件的名称,并且 nmake.exe 必须在您的路径中。 (顺便说一句,我修改了 compilation-error-regexp-alist-alist 以帮助解决错误。如果您也想要这个,请告诉我。)

  2. 较新版本的 VS 没有导出 nmake 文件的按钮。对于这些,我调用 devenv.com。在这种情况下,我有

    (setq compile-command "devenv.com/build Debug ")

    在我的 .xemacs/init.el 中。您必须添加 .sln 文件的名称。尽管我没有使用 VS 6.0 执行此操作,但我相信它也可以正常工作。

关于c++ - 在 Emacs 中使用 Visual Studio 6 C++ 编译器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/952789/

相关文章:

Emacs setq 加载前

c++ - 尽管有互斥锁,线程中的竞争条件

visual-studio - 无法使用 Visual Studio 2019 构建 VSTO 模板项目

android - 无法构建xamarin android项目

c# - MVC 2 与 VS 2010 View 构建错误 : Feature 'anonymous types' cannot be used because it is not part of the ISO-2 C# language specification

r - ESS R 代码传递在 Emacs 控制台模式下不起作用

emacs - Emacs 中 forward-word/backward-word 的任意字符

c++ - 有没有办法为 C++03 实现 auto 关键字

c++ - 如何在不使用if语句的情况下找到数组中的最大值和最小值?

C++ Cootie 游戏错误