Alex Rivera | Logout

How can I compile and run C/C++ code in a Unix console or Mac terminal?

Asked 2008-10-21T08:43:35.380
179

How can I compile/run C or C++ code in a Unix console or a Mac terminal?

Edit
Report

1 Answer

2

Use a makefile. Even for very small (= one-file) projects, the effort is probably worth it because you can have several sets of compiler settings to test things. Debugging and deployment works much easier this way.

Read the make manual. It seems quite long at first glance, but most sections you can just skim over. All in all, it took me a few hours and made me much more productive.

answered 2008-10-21T08:58:47.393

Your Answer