【发布时间】:2011-07-24 20:13:22
【问题描述】:
我试图在 Fedora 15 x64 上编译 C++ 程序。并得到了错误:
./game: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory.
我在某处读到我需要做的就是安装glibc.i686
我安装了它,现在即使在 g++ 中使用“-m64”选项后也会出现另一个错误
error while loading shared libraries: libplayer_1.so: wrong ELF class: ELFCLASS64
这是我的 makefile 的样子:
CONC_INC = ./include \
-I../include
APP = ./src/player_1.cxx
All :
g++ -m64 -Wall -g -fPIC -I$(CONC_INC) -c $(APP)
g++ -m64 -shared -W1 -o libplayer1.so.1.0 *.o
cp libplayer1.so.1.0 ../lib/libplayer_1.so.1.0
ln -sf ../lib/libplayer_1.so.1.0 ../lib/libplayer_1.so
ln -sf ../lib/libplayer_1.so.1.0 ../lib/libplayer_1.so.1
clean:
\rm -f *.so.* *.o
【问题讨论】: