Skip to Content

Code Development on Windows and MacOS

It is very beneficial for CS students to be able to develop code on your own machines, which probably are running either Windows or MacOS. It is good to learn to use Linux too, but there’s nothing like creating programs that run on the OS that you use regularly!

For truly native coding you should really use the development tools that the OS creator provides: this is Visual Studio (VS) for Windows, and XCode for MacOS. NMSU has a license for students to install VS for free, and XCode is freely available for Mac users.

Java is naturally cross-platform and you can install the Java SDK on any platform. But for NMSU CS lab and assignment compatibility, it is better to do most of your C/C++ schoolwork using the Gnu compilers and tools.

This page has suggestions for both platforms, and then a final section on IDEs

Windows

It looks like MSYS2 may seem to be the best option, directly as is. I used to say the best option for Gnu C++ (g++) on Windows was MinGW, and I think most students used the MSYS2 pre-built MinGW package. So now perhaps just using MSYS2 directly is better. You’ll have to decide. I believe this package also has a nice “shell” (terminal window) program that is either bash-like or is actually bash, which is the common Linux shell. It also includes make, gdb, and other tools.

These instructions for VSCode and gcc/g++ seem to be good.

Let me know if you find other good tools and alternatives.

Git for Windows (and also here) seems to be the most popular Git toolset for the Windows platform, but I think MSYS2/MINGW already include the Git tools. It also includes a “git bash” shell that lets you use git command-line tools. I do not know if it plays well with the MinGW tools, but I have never heard students complain. If MinGW already includes git, someone please tell me. I think the MSYS2 package does.

MacOS

I need to learn more but I think XCode already includes the gcc/g++ tools, but I could be wrong. If not there is probably a Brew (Homebrew) package that you can install.

I think the native cc/c++ compiler for MacOS is based on LLVM. Its native debugger is lldb. lldb is a good debugger, it is just different. One student said to me: “I was able to install gdb for the lab by following the guide below, it may be helpful to other students.”

Jason Elwood GDB on Mac

IDEs (Integrated Development Environments)

I see many students using VSCode (or just Code) as their IDE of choice. This is a free, portable, IDE from Microsoft that has become pretty popular. It is separate from their whole Visual Studio development toolset. I have a separate VSCode page talking about VSCode setup.

I think IntelliJ is perhaps the next most popular, I do see some students using it.

Eclipse used to be popular but seems to be waning these days. That does not make me sad.

I personally mostly just use a text editor (gedit) and the command line to create, build, and run my programs. As a CS student you should not be dependent on your IDE, you should know how to develop software without it. IDEs are great as tools, but don’t become (or stay) dependent on them.