之前用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
--
推 inking:兩百多跟兩百出頭差很多吧。三百分制時,兩百整還可以上國02/04 04:52
推 Lawilet:父02/04 04:53
→ inking:立基中,兩百三到兩百六之間大概台北縣立高中吧02/04 04:53
→ inking:...........02/04 04:53
--
All Comments