Skip to content

终端运行C、C++、OC代码 #5

Description

@lvleihere

由于需求,需要简便的运行C类代码,如下终端运行

0.运行C

gcc hello.c -o hello

运行产出:

./hello

1.运行C++

g++ hello.c -o hello

运行产出:

./hello

2.运行OC

clang -fobjc-arc -framework Foundation hello.m -o hello

运行产出:

./hello

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions