fedora14下编译qtopia问题

主要用strrchr函数时,从类型‘const char*’到类型‘char*’的转换无效,新版本g++不支持报错了。


错误1:
     backend/vobject.cpp: In function ‘VObject* addGroup(VObject*, const char*)’:
     backend/vobject.cpp:419: error: invalid conversion from ‘const char*’ to ‘char*’

 修改/x86-qtopia-2.2.0/qtopia/src/libraries/qtopia/backend/vobject.cpp:419行
        char *dot = strrchr(g,'.');
 为    char *dot = (char*)strrchr(g,'.');

错误2:
      wavplugin.cpp: 在成员函数‘virtual bool WavPlugin::isFileSupported(const QString&)’中:
      wavplugin.cpp:435:45: 错误:从类型‘const char*’到类型‘char*’的转换无效

修正/x86-qtopia-2.2.0/qtopia/src/plugins/codecs/wavplugin/wavplugin.cpp:435行
       char *ext = strrchr( path.latin1(), '.' );
为    char *ext = (char*)strrchr( path.latin1(), '.' );

错误3:

       /usr/bin/ld: .obj/release-shared/transferserver.o: undefined reference to symbol 'crypt@@GLIBC_2.0'
       /usr/bin/ld: note: 'crypt@@GLIBC_2.0' is defined in DSO /lib/libcrypt.so.1 so try adding it to the linker command line

       这个找了好久发现用了crypt函数 而没使用-lcrypt,   qtopia-2.2.0-FriendlyARM/qtopia/configure  1373行加入

       print CONFIG_PRI "LIBS+=-lcrypt/n";

如下:

    print CONFIG_PRI "QTOPIA_FONT_SIZES=$opt_fontsizes/n";
    print CONFIG_PRI "QTOPIA_FONT_FAMILIES=$opt_fontfamilies/n";
    print CONFIG_PRI "LIBS+=-lcrypt/n";

注意修改每次build时都会从qtopia-2.2.0.tar.gz解压出来,需要修改qtopia-2.2.0.tar.gz里的文件,要不每次build都会被覆盖。

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 5
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值