[軟體] CodeBlocks寫C
之前用windows系統都是用Dev C++寫程式
現在改成MAC了要找寫程式的工具
查了一下有找到XCODE 跟 CodeBlocks
問題來了 我在CodeBlocks上要試試寫出hello world
可是一直都跑不出來
以下程式碼:
#include <stdio.h>
#include <stdlib.h>
int main()
{
printf("hello world!");
}
看之前的po文mac很像不用打system("pause")
點了Build and Run 就會跳出一個框框
Information
It seems that this project has not been built yet
Do you want to build it now?
點了yes之後還是沒有跑出來
下面的框框顯示
-------------- Build: Debug in tttttest ---------------
Linking console executable: bin/Debug/tttttest
ld: duplicate symbol _main in obj/Debug/main.o and obj/Debug/Untitled2.o
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings
請問是我的設定錯誤嗎還是程式碼錯了??
剛碰mac真的好不熟悉阿~~
麻煩各位解解決小的疑惑
謝謝m(__)m
--
推
02/04 04:52,
02/04 04:52
推
02/04 04:53,
02/04 04:53
→
02/04 04:53,
02/04 04:53
→
02/04 04:53,
02/04 04:53
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 42.65.68.68
→
05/04 11:00, , 1F
05/04 11:00, 1F
→
05/04 11:01, , 2F
05/04 11:01, 2F
→
05/04 11:01, , 3F
05/04 11:01, 3F
→
05/04 11:02, , 4F
05/04 11:02, 4F
→
05/04 11:03, , 5F
05/04 11:03, 5F
→
05/04 11:06, , 6F
05/04 11:06, 6F
→
05/04 11:10, , 7F
05/04 11:10, 7F
→
05/04 11:11, , 8F
05/04 11:11, 8F
→
05/04 12:02, , 9F
05/04 12:02, 9F
→
05/04 12:28, , 10F
05/04 12:28, 10F
→
05/04 12:28, , 11F
05/04 12:28, 11F
推
05/04 18:44, , 12F
05/04 18:44, 12F
→
05/04 18:45, , 13F
05/04 18:45, 13F
討論串 (同標題文章)