0

我已经尝试了几天用 -ljpeg 编译 -swc 但没有任何运气。这是我一直在做的事情。在我的 jpeg_sample_linker.c 中,它有两个标题

#include "AS3.h"
#include <jpeglib.h> //or #include "jpeglib.h"

文件的其余部分几乎是空的,但可以编译(因为我要做的就是先编译带有标题的文件)。

我的 gcc 命令是:

alc-on
gcc -swc -ljpeg jpeg_sample_linker.c -o jpeg_sample_linker.swc 
alc-off

而且,gcc 一直说它找不到 libjpeg.h 我也尝试过

alc-on
gcc -swc  -I/usr/local/include -L/usr/local/lib -ljpeg jpeg_sample_linker.c -o jpeg_sample_linker.swc 
alc-off

它仍然报同样的错误“error: jpeglib.h: No such file or directory”。

我可以知道如何解决这个编译错误吗?

十亿感谢G

4

1 回答 1

0

真是个无赖,

the compilation can be solved by editing gcc in /Library/alchemy-darwin-v0.5a/achacks
or
moving everything in /usr/local/lib and /usr/local/include to 
to $ALCHEMY_HOME/usr/local/include and $ALCHEMY_HOME/usr/local/lib

于 2011-03-24T07:39:46.413 回答