Can I code and compile all type of Visual Studio Application from Command line?

后端 未结 3 1683
长发绾君心
长发绾君心 2021-01-06 12:43

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 unbel

3条回答
  •  不思量自难忘°
    2021-01-06 12:56

    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.

提交回复
热议问题