我正在尝试a program关于搅拌器变形。我的笔记本电脑是amd64,能够支持i386。OpenGL问题:'不兼容'vs'找不到'
[email protected]:/usr/bin$ dpkg --print-foreign-architectures
i386
[email protected]:/usr/bin$ dpkg --print-architecture
amd64
我对makefile脚本没有太多经验。根据谷歌搜索信息,我在makefile.mk中添加了两行代码。
# -I option to help the compiler finding the headers
CFLAGS += $(addprefix -I, $(INCLUDE_PATH))
CC=gcc -m32
这里是问题: 当我运行与任何模板的OpenGL代码:
gcc test.c -lm -lpthread -lglut -lGL -lGLU -o test
似乎代码和库正常工作。
但是,如果我做同样的makefile.mk(CC = GCC),它提供了许多错误以下形式:
/usr/bin/ld: i386 architecture of input file `../external/lib/libxxxxxxxx.a(xxxxxxxx.o)' is incompatible with i386:x86-64 output
如果我使用(CC = GCC -m32)时,错误将切换到:
/usr/bin/ld: cannot find -lglut
/usr/bin/ld: cannot find -lGL
/usr/bin/ld: cannot find -lGLU
我想也许有一些错误在运行32位应用程序的64位操作系统和链接库?