Start C's new journey on your Mac

Source: Internet
Author: User

Break yourself and re-learn. Prepare for C's pilot ...

1. Windows does not support the GNU GCC itself, but some programming software is available for free download and installation.

The video below recommends Dev C + +, an open source programming software that comes with a mingw compiler that can be used on either 32-bit or 64-bit Windows.

The website of Dev C + + is: http://sourceforge.net/projects/orwelldevcpp/.

Please be sure to form a good habit, download from the software's official website.

2. Mac OS is based on BSD Unix, so you can use GCC directly. However, Mac OS does not install programming software such as GCC by default. So we're going to install Apple's own prepared GCC programming environment on Mac OS.

In the case of a newer Mac system, the following will be prompted after the terminal enters GCC:

Xcrun:error:invalid Active developer Path (/library/developer/commandlinetools), missing xcrun at:/library/developer/ Commandlinetools/usr/bin/xcrun

At this point in the terminal run Xcode-select--install This statement, you can (install the full version of Xcode is necessary). If you do not like Xcode too big, then directly according to the prompts to install GCC, and then directly on the terminal to the code.

Specific steps: Open terminal, enter "CD desktop", and then enter "Emacs test.c", you can start to write. After the completion of the control + X, control + S, control + Z, three sets of shortcut keys to save the exit. Finally enter "make test", compile successfully, and finally enter "./test", you can run it.

Start C's new journey on your Mac

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.