LoginSignup
0
1

More than 3 years have passed since last update.

Cの開発環境

Last updated at Posted at 2019-06-05

macでGCCをつかう

趣味のC言語の学習にMacを選択する。
Winだと面倒くさそーなので
Macだと最初からgccのコンパイラが標準搭載されてる。

clang -v
Apple LLVM version 10.0.1(clang-1001.0.46.4)

で、確認OK。

vi hello.c

そんで、コンパイルは

gcc -o hello hello.c

Windows環境だとパスが通っているのだが、
Macはそんなんしてくれないので、
現在のフォルダパスにhelloの場所を明示しておく必要があるので

./hello

でけた

ちなみに、エスケープシーケンス

printf("\033[2J");  //画面消去
printf("\033[33m"); // 黄くなる
printf("\033[39m"); //元に戻す

visual studio codeの導入
無料のIDE:vscode
C/C++のエクステンション機能(Code Runner)でプログラムをコンパイルして実行できる

CodeBlocksは、Mac環境下だと2013年12月26日を最後にリリースがされてないから却下

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1