Fedora 13下编译libfetion的问题和解决办法

前几日升级到了Fedora 13,今天尝试装一下libfetion,可以在inux下使用中国移动飞信,先到libfetion官方网站下载最新V1.2版的源代码,下载地址为:按照官方网站提供的编译方法(详见)1、先安装编译环境(在root用户下,下同)yum install qt4-devel curl-devel gcc glibc-devel2、然后解压缩tar -zxvf linux-fetion-v1.2.tar.gz3、进入解压后的文件夹cd linux-fetion-v1.24、运行编译命令qmake-qt4make 5、最后运行安装程序./install.sh但是在执行第四步的时候,make之后出现如下错误:g++ -Wl,-O1 -o linux-fetion .tmp/main.o .tmp/fxmain.o .tmp/fxloginwindow.o .tmp/fxmainwindow.o .tmp/fxbuddy.o .tmp/fxbuddyManage.o .tmp/fxmsgwindow.o .tmp/fxaccountTab.o .tmp/fxmytabwidget.o .tmp/fxResource.o .tmp/fxdb.o .tmp/fxcontactinfo.o .tmp/fxaddBuddyWindow.o .tmp/fxqunwindow.o .tmp/fxEncrypt.o .tmp/fxshowHistory.o .tmp/fxverifyAccount.o .tmp/fxInputFace.o .tmp/fxproxy.o .tmp/fxrefuseSMS.o .tmp/fxsendGroupSMS.o .tmp/fxscheduleSms.o .tmp/fxscheduleSmsManage.o .tmp/fxsettings.o .tmp/fxconfigDlg.o .tmp/fxskinmanage.o .tmp/fxwidget.o .tmp/fxwidgettitlebar.o .tmp/qlayoutengine.o .tmp/qwidgetresizehandler.o .tmp/sqlite3.o .tmp/fxlocationparser.o .tmp/moc_fxmain.o .tmp/moc_fxmainwindow.o .tmp/moc_fxloginwindow.o .tmp/moc_fxbuddy.o .tmp/moc_fxbuddyManage.o .tmp/moc_fxmsgwindow.o .tmp/moc_fxaccountTab.o .tmp/moc_fxmytabwidget.o .tmp/moc_fxcontactinfo.o .tmp/moc_fxaddBuddyWindow.o .tmp/moc_fxqunwindow.o .tmp/moc_fxshowHistory.o .tmp/moc_fxverifyAccount.o .tmp/moc_fxInputFace.o .tmp/moc_fxproxy.o .tmp/moc_fxLableMouse.o .tmp/moc_fxLineEditFocus.o .tmp/moc_fxrefuseSMS.o .tmp/moc_fxsendGroupSMS.o .tmp/moc_fxscheduleSms.o .tmp/moc_fxscheduleSmsManage.o .tmp/moc_fxsettings.o .tmp/moc_fxconfigDlg.o .tmp/moc_fxwidget.o .tmp/moc_fxwidgettitlebar.o .tmp/moc_qwidgetresizehandler_p.o .tmp/moc_fxusertree.o .tmp/moc_fxeditablelabel.o .tmp/moc_fxlocationparser.o -lcurl -lssl ./libfetion/lib/libfetion_32.a -lQtXmlPatterns -lQtXml -lQtGui -lQtCore -lpthread /usr/bin/ld: .tmp/sqlite3.o: undefined reference to symbol ‘dlopen@@GLIBC_2.1’/usr/bin/ld: note: ‘dlopen@@GLIBC_2.1’ is defined in DSO /lib/libdl.so.2 so try adding it to the linker command line/lib/libdl.so.2: could not read symbols: Invalid operationcollect2: ld 返回 1make: *** [linux-fetion] 错误 1大致意思是 .tmp/sqlite3.o引用了一个未定一的符号 ‘dlopen@@GLIBC_2.1’, ‘dlopen@@GLIBC_2.1’在/lib/libdl.so.2中定义,尝试将/lib/libdl.so.2加入到连接器命令中在百度和google搜了一圈,有人给出一个fedora官方的地址:fedoraproject.org/wiki/UnderstandingDSOLinkChange进去看了一下,大致的意思是说这是fedora13的一个bug,如果你的程序需要引用libA和libB,而libB又需要引用libA,那么你的程序可能只会连接libB。于是上面报错的意思应该是程序需要.tmp/sqlite3.o,而.tmp/sqlite3.o需要的东西又在/lib/libdl.so.2中,因此程序找不到/lib/libdl.so.2。根据官方的建议,只要在gcc的-o参数后加上/lib/libdl.so.2即可,在libfetion中,应该修改Makefile文件,打开Makefile文件,找到LIBS = $(SUBLIBS) -lcurl -lssl ./libfetion/lib/libfetion_32.a -lQtXmlPatterns -lQtXml -lQtGui -lQtCore -lpthread一行,在其后面加上/lib/libdl.so.2或-ldl即可,,如下LIBS = $(SUBLIBS) -lcurl -lssl ./libfetion/lib/libfetion_32.a -lQtXmlPatterns -lQtXml -lQtGui -lQtCore -lpthread -ldl或者LIBS = $(SUBLIBS) -lcurl -lssl ./libfetion/lib/libfetion_32.a -lQtXmlPatterns -lQtXml -lQtGui -lQtCore -lpthread /lib/libdl.so.2然后继续执行第四步,make成功,./install.sh成功,最终在程序菜单中见到libfetion的图标,打开程序,输入手机号和密码,登录成功!

第一个青春是上帝给的;第二个的青春是靠自己努力的

Fedora 13下编译libfetion的问题和解决办法

相关文章:

你感兴趣的文章:

标签云: