我练习使用静态库编程时,按书上内容输入:
"gcc -o usehello_static usehello.c libhello.a"
结果提示:
"/usr/bin/ld: i386 architecture of input file `libhello.a(libhello.o)' is incompatible with i386:x86-64 output
collect2: ld 返回 1"
没有生成执行文件,该怎么解决?(5ty(
------------------------
我是在vmware中装的ubuntu7.10 for amd64。 另外,使用的库文件和c源文件都来自此书的附赠光盘。
我的CPU是:AMD Athlon(tm) 64*2 Dual Core Processor 4200+ 2.20GHz
gcc版本4.1.3
gcc 的 manual 有几百页,也不知道往哪里找参考。
阅读(543) | 评论(0) | 转发(0) |