​​ ​

The Apple Support Community will permanently close on November 20, 2026. Starting today, the site will no longer accept new posts and is available in a read-only state.


You can continue to find trusted guidance and support on the official Apple Support site. 


We want to thank the community members who have contributed their time and expertise to help others with their Apple products.


how do I run c++ on my MacBook Air m1 in visual studio

I'm trying to run c++ on visual studio on my MacBook Air m1 for learning purposes but can't .

I'll appreciate it if anyone can help me.

MacBook Air 13″, macOS 13.5

Posted on Aug 12, 2023 10:14 AM

Question marked as Top-ranking reply

Posted on Aug 12, 2023 1:34 PM

What’s your central goal here? Learning VS Code and C++, or Xcode and C++, or C++ at the command line?


…if learning about C++ on macOS, you can use the (free) Xcode IDE, and which fully supports C++.


Xcode IDE can be installed from the Mac App Store.


…If you want help with learning or using a third-party IDE such as Microsoft VS Code, I’d suggest checking with the vendor. In this case, Microsoft has discussion forums and documentation available for VS code:

https://code.visualstudio.com/docs/cpp/config-clang-mac


…If you just want focus on and use C++ with no IDE, the command line tools and a text editor and clang will work.


The command-line tools by launching Terminal app and issuing the command:

xcode-select --install


Related: https://www.macobserver.com/analysis/5-ways-to-write-c-code-on-your-mac/

2 replies
Question marked as Top-ranking reply

Aug 12, 2023 1:34 PM in response to ASH_333

What’s your central goal here? Learning VS Code and C++, or Xcode and C++, or C++ at the command line?


…if learning about C++ on macOS, you can use the (free) Xcode IDE, and which fully supports C++.


Xcode IDE can be installed from the Mac App Store.


…If you want help with learning or using a third-party IDE such as Microsoft VS Code, I’d suggest checking with the vendor. In this case, Microsoft has discussion forums and documentation available for VS code:

https://code.visualstudio.com/docs/cpp/config-clang-mac


…If you just want focus on and use C++ with no IDE, the command line tools and a text editor and clang will work.


The command-line tools by launching Terminal app and issuing the command:

xcode-select --install


Related: https://www.macobserver.com/analysis/5-ways-to-write-c-code-on-your-mac/

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

how do I run c++ on my MacBook Air m1 in visual studio

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.