免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 4448 | 回复: 5
打印 上一主题 下一主题

[新手入门] 难住我了,AIX下面使用VACPP编译程序停住不动了 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-04-24 20:35 |只看该作者 |倒序浏览
AIX Version 5
VACPP Version 6.0
boost boost_1_33_1

我主要是想移植BOOST到AIX下面,可是type_traits/type_with_alignment.hpp里面报错

// This alignment method originally due to Brian Parker, implemented by David
// Abrahams, and then ported here by Doug Gregor.
template <std::size_t Align>
class type_with_alignment
{
    typedef detail::lower_alignment<Align> t1;
    typedef typename mpl::if_c<
          ::boost::detail::is_aligned< ::boost::alignment_of<t1>::value,Align >::value
        , t1
        , detail::max_align
        >::type align_t;

    BOOST_STATIC_CONSTANT(std::size_t, found = alignment_of<align_t>::value);

    BOOST_STATIC_ASSERT(found >= Align);  //这里报错
    BOOST_STATIC_ASSERT(found % Align == 0);  //这里报错

public:
    typedef align_t type;
};


"/usr/local/include/boost/type_traits/type_with_alignment.hpp", line 204.5: 1540-1269 (S) The template argument for the non-type template parameter of type "bool" must be an integral constant expression.
"/usr/local/include/boost/optional/optional.hpp", line 96.9: 1540-0700 (I) The previous message was produced while processing "class boost::type_with_alignment<1>".
"/usr/local/include/boost/type_traits/type_with_alignment.hpp", line 204.5: 1540-1269 (S) The template argument for the non-type template parameter of type "bool" must be an integral constant expression.
"/usr/local/include/boost/optional/optional.hpp", line 96.9: 1540-0700 (I) The previous message was produced while processing "class boost::type_with_alignment<4>".
make: 1254-004 The error code from the last command is 1.

我把哪两行代码注释掉后(反正也是assert语句,我觉得注释掉问题也不太大,只要先能编译过去),在编译同一个文件的时候就停在那里了,编译器也不报错,CPU占用率也一直是50%(就是编译器的那个进程),几个小时过去了还在那里,不知道该怎么办了,那位高人帮忙看看有可能是那方面的问题啊

万分感谢

论坛徽章:
0
2 [报告]
发表于 2008-06-03 15:46 |只看该作者

遇到同样问题

和楼主一样郁闷ing.


网上有资料说由于aiX自带的编译器版本太低, boost根本编译不过, 只能先装gcc然后才能使用boost.

不知道是不是真的.

论坛徽章:
0
3 [报告]
发表于 2008-06-03 15:50 |只看该作者

不对, 我的情况和楼主还不一样呢.

我是用xlC编译的, 报错如下:

"boost/boost/type_traits/is_member_pointer.hpp", line 52.63: 1540-0403 (S) "template <class T, class U> struct boost::is_member_pointer<U T::* const>" is already defined.
"boost/boost/type_traits/is_member_pointer.hpp", line 49.63: 1540-0425 (I) "is_member_pointer<U T::*>" is defined on line 49 of "boost/boost/type_traits/is_member_pointer.hpp".
"boost/boost/type_traits/is_member_pointer.hpp", line 53.63: 1540-0403 (S) "template <class T, class U> struct boost::is_member_pointer<U T::* volatile>" is already defined.
"boost/boost/type_traits/is_member_pointer.hpp", line 49.63: 1540-0425 (I) "is_member_pointer<U T::*>" is defined on line 49 of "boost/boost/type_traits/is_member_pointer.hpp".
"boost/boost/type_traits/is_member_pointer.hpp", line 54.63: 1540-0403 (S) "template <class T, class U> struct boost::is_member_pointer<U T::* const volatile>" is already defined.
"boost/boost/type_traits/is_member_pointer.hpp", line 49.63: 1540-0425 (I) "is_member_pointer<U T::*>" is defined on line 49 of "boost/boost/type_traits/is_member_pointer.hpp".
"boost/boost/lambda/detail/lambda_traits.hpp", line 253.13: 1540-1206 (S) The class template instantiation of "parameter_traits_<boost::lambda::lambda_functor<boost::lambda::placeholder<1> >,const boost::lambda::lambda_functor<boost::lambda::placeholder<1> > >" is ambiguous.
"boost/boost/lambda/detail/lambda_traits.hpp", line 216.8: 1540-1207 (I) The template arguments match "template struct parameter_traits_<lambda_functor<Arg>, Any>".
"boost/boost/lambda/detail/lambda_traits.hpp", line 221.8: 1540-1207 (I) The template arguments match "template struct parameter_traits_<const lambda_functor<Arg>, Any>".
"boost/boost/lambda/detail/lambda_traits.hpp", line 227.8: 1540-1207 (I) The template arguments match "template struct parameter_traits_<volatile lambda_functor<Arg>, Any>".
"boost/boost/lambda/detail/lambda_traits.hpp", line 232.8: 1540-1207 (I) The template arguments match "template struct parameter_traits_<const volatile lambda_functor<Arg>, Any>".
"boost/boost/lambda/detail/lambda_traits.hpp", line 288.11: 1540-0700 (I) The previous message was produced while processing "struct boost::lambda::const_copy_argument<boost::lambda::lambda_functor<boost::lambda::placeholder<1> > >".
kfdev$cc -Iboost/ -DBOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION  example.cpp -o example
"boost/boost/type_traits/alignment_of.hpp", line 61.1: 1540-0140 (S) The text "rebind" is unexpected.  "alignment_of_rebind" may be undeclared, ambiguous, or may require "typename" qualification.
"boost/boost/type_traits/alignment_of.hpp", line 61.2: 1540-1303 (I) "class alignment_of_rebind" is not visible.
"boost/boost/lambda/detail/lambda_traits.hpp", line 191.26: 1540-0063 (S) The text "boost::reference_wrapper" is unexpected.
"boost/boost/lambda/detail/lambda_traits.hpp", line 196.32: 1540-0063 (S) The text "boost::reference_wrapper" is unexpected.
"boost/boost/lambda/detail/lambda_traits.hpp", line 201.35: 1540-0063 (S) The text "boost::reference_wrapper" is unexpected.
"boost/boost/lambda/detail/lambda_traits.hpp", line 206.41: 1540-0063 (S) The text "boost::reference_wrapper" is unexpected.
"boost/boost/lambda/detail/lambda_traits.hpp", line 434.39: 1540-0064 (S) Syntax error:  "(" was expected but ">" was found.
"boost/boost/lambda/detail/lambda_traits.hpp", line 439.26: 1540-0063 (S) The text "reference_wrapper" is unexpected.
"boost/boost/type_traits/remove_reference.hpp", line 42.1: 1540-0140 (S) The text "rebind" is unexpected.  "remove_reference_rebind" may be undeclared, ambiguous, or may require "typename" qualification.
"boost/boost/type_traits/remove_reference.hpp", line 42.2: 1540-1303 (I) "class remove_reference_rebind" is not visible.
"boost/boost/lambda/core.hpp", line 69.42: 1540-0274 (S) The name lookup for "free1" did not find a declaration.
"boost/boost/lambda/core.hpp", line 70.42: 1540-0274 (S) The name lookup for "free2" did not find a declaration.
"boost/boost/lambda/core.hpp", line 71.42: 1540-0274 (S) The name lookup for "free3" did not find a declaration.


楼主用的是vacpp,  我也用这个编译器编译一下我的程序试试看.

论坛徽章:
0
4 [报告]
发表于 2008-06-03 16:04 |只看该作者

我是aix 5.2, vacpp 6.0, boost boost_1_35_1

一会换一下楼主所用的boost boost_1_33_1再编译一下试试, 看是否存在和楼主一样的问题.

论坛徽章:
0
5 [报告]
发表于 2008-06-03 16:52 |只看该作者

33版的boost我这里也编译不过

编译的就是在tutorial.html里面写的一个简单的例子程序:
#include <boost/lambda/lambda.hpp>
#include <iostream>
#include <iterator>
#include <algorithm>

int main()
{
    using namespace boost::lambda;
    typedef std::istream_iterator<int> in;

    std::for_each(
        in(std::cin), in(), std::cout << (_1 * 3) << " " );
}







报错如下:
kfdev$xlC -Iboost_1_33_1 example.cpp -o example
"boost_1_33_1/boost/lambda/detail/lambda_traits.hpp", line 253.13: 1540-1206 (S) The class template instantiation of "parameter_traits_<boost::lambda::lambda_functor<boost::lambda::placeholder<1> >,const boost::lambda::lambda_functor<boost::lambda::placeholder<1> > >" is ambiguous.
"boost_1_33_1/boost/lambda/detail/lambda_traits.hpp", line 216.8: 1540-1207 (I) The template arguments match "template struct parameter_traits_<lambda_functor<Arg>, Any>".
"boost_1_33_1/boost/lambda/detail/lambda_traits.hpp", line 221.8: 1540-1207 (I) The template arguments match "template struct parameter_traits_<const lambda_functor<Arg>, Any>".
"boost_1_33_1/boost/lambda/detail/lambda_traits.hpp", line 227.8: 1540-1207 (I) The template arguments match "template struct parameter_traits_<volatile lambda_functor<Arg>, Any>".
"boost_1_33_1/boost/lambda/detail/lambda_traits.hpp", line 232.8: 1540-1207 (I) The template arguments match "template struct parameter_traits_<const volatile lambda_functor<Arg>, Any>".
"boost_1_33_1/boost/lambda/detail/lambda_traits.hpp", line 288.11: 1540-0700 (I) The previous message was produced while processing "struct boost::lambda::const_copy_argument<boost::lambda::lambda_functor<boost::lambda::placeholder<1> > >".

论坛徽章:
1
荣誉版主
日期:2011-11-23 16:44:17
6 [报告]
发表于 2008-06-03 16:59 |只看该作者
那就试试gcc呗
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP