简体   繁体   中英

Using decompression library in AS3 via FlasCC

I have an AS3 AIR project in which I need to decompress files using a specific decompression method. Apparently the code for this is found here, in the contrib/blast directory of the zlib distribution . I would port this to AS3 manually, however I'm practically illiterate in C/C++ and don't have much experience in coding compression/decompression algorithms either.

I discovered FlasCC, and decided to download it and see if it works. The hello world sample worked well and everything. I looked up how to compile SWCs, since I figured that would be a good form to use it in, and attempted to compile it. Unfortunately it didn't work.

This is what I write:

$ "/cygdrive/f/C2F/FlasCC/sdk/usr/bin/gcc" blast.c -emit-swc=blast -o blast.swc

And this is what I get:

/cygdrive/f/C2F/FlasCC/sdk/usr/bin/../../usr/lib/stdlibs_abc/crt1_c.o: error: un
defined reference to '_main'
collect2: ld returned 1 exit status

As I mentioned I'm completely useless at C, and this is the first time I've used FlasCC. If anybody could tell me what I'm doing wrong, or even just provide an alternative, it would be greatly appreciated.

swc requires a main entry point.. add:

int main() 
{ 
    AS3_GoAsync();
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM