Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

只支持32位的吗 #6

Closed
reverland opened this issue Apr 18, 2012 · 6 comments
Closed

只支持32位的吗 #6

reverland opened this issue Apr 18, 2012 · 6 comments

Comments

@reverland
Copy link

那个,小白不懂,下来make下发现

gcc -Wall -g -c eval.c -o eval.o
gcc -Wall -g -c model.c -o model.o
gcc -Wall -g -c primitives.c -o primitives.o
primitives.c: 在函数‘register_primitive’中:
primitives.c:342:33: 警告:变量‘head_node’被设定但未被使用 [-Wunused-but-set-variable]
gcc -Wall -g -c print.c -o print.o
gcc -Wall -g -c read.c -o read.o
gcc -Wall -g main.o eval.o model.o primitives.o print.o read.o -o lt
/usr/bin/ld: i386 architecture of input file `main.o' is incompatible with i386:x86-64 output
collect2: 错误:ld 返回 1
make: *** [lt] 错误 1

@reverland
Copy link
Author

然后加了-m32然后

gcc -Wall -g main.o eval.o model.o primitives.o print.o read.o -o lt
/usr/bin/ld: i386 architecture of input file `main.o' is incompatible with i386:x86-64 output
collect2: 错误:ld 返回 1
make: *** [lt] 错误 1

难道当个小白鼠都不成....

@Liutos
Copy link
Owner

Liutos commented Apr 18, 2012

不好意思,你是不是下载了之前的版本,所以main.o文件也包含在里面了?如果哦是的话,把所有*.o文件删掉再make一次。Makefile提供了clean选项~

@reverland
Copy link
Author

嗯,删掉后没加-ms32,make passed。

@reverland reverland reopened this Apr 18, 2012
@Liutos
Copy link
Owner

Liutos commented Apr 19, 2012

呵呵,恭喜恭喜~

@biergaizi
Copy link

挖坟来了。@reverland 是不是手误又把这个 Issue ReOpen 了,赶紧关上吧……

@reverland
Copy link
Author

@biergaizi 跪……

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants