1

I have been trying in vain for almost two weeks now to generate a "l.bc" files based on my very own library for building a swc with Alchemy.

I have tried doing (in both alc-on / alc-off modes)

ar rc myOwnLibrary.a myOwnlibraryObj1.o myOwnlibraryObj2.o

But still no l.bc files are generated, instead only .a files are generated.

How do I get the proper l.bc files generated?

PS. I even followed examples in Adobe Alchemy: Compiling a C library to run in Flex/Flash.

4

1 回答 1

3

当您使用 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
$ 

如果这对您不起作用,我认为您的炼金术安装可能被巧妙地损坏了。我建议重新安装它。

于 2011-05-19T23:21:49.223 回答