當你使用gcc和使用ar時,你必須在整個時間都有alc。例如:
$ alc-on
$ which gcc
~/alchemy-darwin-v0.5a/achacks/gcc
$ which ar
~/alchemy-darwin-v0.5a/achacks/ar
$
$ ls -l
total 16
-rw-r--r-- 1 29 May 19 16:59 test1.c
-rw-r--r-- 1 29 May 19 16:59 test2.c
$
$ cat test1.c
int test1() {
return 0;
}
$
$ cat test2.c
int test2() {
return 0;
}
$
$ gcc -c test1.c
$ gcc -c test2.c
$ ls -l
total 32
-rw-r--r-- 1 29 May 19 16:59 test1.c
-rwxr-xr-x 1 532 May 19 17:17 test1.o
-rw-r--r-- 1 29 May 19 16:59 test2.c
-rwxr-xr-x 1 532 May 19 17:17 test2.o
$ ar rc libtest.a test1.o test2.o
$
$ ls -l
total 48
-rw------- 1 1268 May 19 17:17 libtest.a
-rw-r--r-- 1 668 May 19 17:17 test.l.bc
-rw-r--r-- 1 29 May 19 16:59 test1.c
-rwxr-xr-x 1 532 May 19 17:17 test1.o
-rw-r--r-- 1 29 May 19 16:59 test2.c
-rwxr-xr-x 1 532 May 19 17:17 test2.o
$
如果這不適合你我覺得你可能有一個微妙的腐蝕鍊金術安裝。我建議重新安裝它。
這是什麼操作系統? – paleozogt 2011-05-19 23:25:01
您的帳戶已合併 – 2011-05-26 12:18:22