QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 696|回复: 3

Magic1.2F默认安装无法编译kopete-0.10 !

[复制链接]
发表于 2005-7-1 15:46:54 | 显示全部楼层 |阅读模式
[root@magic kopete-0.10.1]# pwd
/root/Down/kopete-0.10.1

[root@magic kopete-0.10.1]# ./configure
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking for -p flag to install... yes
checking whether build environment is sane... yes
......................................
checking for msgfmt... /usr/bin/msgfmt
checking for gmsgfmt... /usr/bin/msgfmt
checking for xgettext... /usr/bin/xgettext
checking if C++ programs can be compiled... no
configure: error: Your Installation isn't able to compile simple C++ programs.
Check config.log for details - if you're using a Linux distribution you might miss
a package named similar to libstdc++-dev.


Magic1.2 fina刚刚装好的,why ?

默认带的gcc有问题 ??!!


其他一些软件也是如此,无法编译安装。

麻烦达人们帮忙看看,
谢谢!!
 楼主| 发表于 2005-7-1 15:48:19 | 显示全部楼层
测试了一下,果然编译c++程序有问题:

#include <string>
using namespace std;

int
main ()
{

  string astring="Hallo Welt.";
  astring.erase(0, 6); // now astring is "Welt"
  return 0;

}
[root@magic kopete-0.10.1]# g++ t.cxx -o t
/usr/lib/gcc/i686-magic-linux/3.4.3/../../../../include/c++/3.4.3/bits/basic_string.h: In member function `std::basic_string<_CharT, _Traits, _Alloc>& std::basic_string<_CharT, _Traits, _Alloc>::erase(typename _Alloc::size_type, typename _Alloc::size_type) [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>]':
t.cxx:9:   instantiated from here
/usr/lib/gcc/i686-magic-linux/3.4.3/../../../../include/c++/3.4.3/bits/basic_string.h:1040: error: invalid conversion from `void*' to `const char*'
/usr/lib/gcc/i686-magic-linux/3.4.3/../../../../include/c++/3.4.3/bits/basic_string.h:1040: error:   initializing argument 3 of `std::basic_string<_CharT, _Traits, _Alloc>& std::basic_string<_CharT, _Traits, _Alloc>::_M_replace_safe(typename _Alloc::size_type, typename _Alloc::size_type, const _CharT*, typename _Alloc::size_type) [with _CharT= char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>]'
回复

使用道具 举报

发表于 2005-7-1 16:39:59 | 显示全部楼层
你这程序我试了,很正常,恐怕你安装的ML有问题,重装一次吧。
回复

使用道具 举报

 楼主| 发表于 2005-7-1 17:26:45 | 显示全部楼层
多谢!

重装了*c++ *后好了
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-11-26 04:51 , Processed in 0.039507 second(s), 16 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表