watercloud 发表于 2005-7-1 15:46:54

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

# pwd
/root/Down/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有问题 ??!!


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

麻烦达人们帮忙看看,
谢谢!!

watercloud 发表于 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;

}
# 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) ':
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) '

sejishikong 发表于 2005-7-1 16:39:59

你这程序我试了,很正常,恐怕你安装的ML有问题,重装一次吧。

watercloud 发表于 2005-7-1 17:26:45

多谢!

重装了*c++ *后好了 :)
页: [1]
查看完整版本: Magic1.2F默认安装无法编译kopete-0.10 !