Compile a C # project using Emacs

I use emacs to encode and compile a C # project.

My project folder contains:

--\test ----Helloworld.cs ----make.bat 

Then I open Helloworld.cs in the buffer and compile Mx, emacs will compile the project for me.

But if my project folder design is as follows:

 --\test ----\src ------Helloworld.cs ----make.bat 

Then I open Helloworld.cs in the buffer and compile Mx, emacs cannot find make.bat.

I need to find make.bat for the “compile command” in the minibuffer.

Any help is appreciated.

+4
source share
2 answers

If ../make.bat works, then this is really a good option. If not, you can use cd ../; ./make.bat cd ../; ./make.bat as your compilation team. You can even get Emacs to search the directory hierarchy for the make.bat file and add as many ../ as possible.

+1
source

emacs compile is usually started from the same directory in which the source is located. Set the Mx compilation command to ../make.bat (or specify an absolute path), and everything should work.

+1
source

Source: https://habr.com/ru/post/1434015/


All Articles