I have a little bit of C programming experience from school, but it was all Unix. I want to compile some C with Emacs, using Emacs as a second IDE.
What is the easiest way to go about doing this? I downloaded Cygwin with no successful compile of a helloWorld.c in Emacs. Even opening the cygwin command prompt (shell or whatever its called), it doesn’t recognize gcc as a command.
Error
‘make’ is not recognized as an internal or external command, operable program or batch file.
I need a compiler that works on Windows, is free (or comes with visual studio), and can be used with Emacs. What to type into Emacs after the M-x compile command would be nice to know too. I looked at MinGW, but downloading it is a chore.
I hope the question makes sense. I often get lost in the open source world.
Environment
Windows XP, Visual Studio 2010, Emacs 23.2.1, Windows 7.1 SDK installed, Cygwin
I use Visual Studio as a compiler with emacs as an editor.
Just install Visual Studio C++ 2010 Express Edition.
Then what I do is write an nmake Makefile and invoke nmake from
the Visual Studio Command Prompt (accessible from the Programs menu).
This works fine for smaller projects.
See http://msdn.microsoft.com/en-us/library/f35ctcxw.aspx
for more details.
For larger projects you can create a solution in Visual Studio and
just use emacs as an editor. You can also invoke msbuild from the
command prompt to build the solution.
Also, the visual studio command prompt just invokes vcvars.bat (or something like it)
to set up the necessary environment. I guess you might be able to modify the emacs shell to point to an instance of cmd that has run this bat file on startup?