bug-commoncpp
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compiller error (Win32) Re: Temporary cvs setup for testing new 1.1


From: David Sugar
Subject: Re: Compiller error (Win32) Re: Temporary cvs setup for testing new 1.1 release
Date: Fri, 19 Dec 2003 09:03:39 -0500
User-agent: KMail/1.5.3

I gather from this that the VS2003 C++ compiler also does not handle 
dynamically sized arrays on the local heap (stack).  There is a #ifdef before 
there:

#if !defined(_MSC_VER) || _MSC_VER >= 1300
 
Appearently the check for _MSC_VER >= 1300 should be dropped...


On Friday 19 December 2003 08:13 am, Andrey Kulikov wrote:
> DS> I have setup temporary cvs at Sourceforge for testing what will be the
> 1.1 DS> release of GNU Common C++.  While there should be no major issues
> (and yes DS> cmdoptns is back in), everyone does need to check existing
> code for DS> compatibility when building with the new 1.1 release.
>
> DS> cvs
> DS> -d:pserver:address@hidden:/cvsroot/cplusplus login
>
> DS> cvs -z3
> DS> -d:pserver:address@hidden:/cvsroot/cplusplus co
> DS> commoncpp2
>
>
> I have try to compile these sources under Windows, and have some
> compiler error.
> Enviroment: WindowsXP, Visual Studio 2003
>
> Errors:
> ===========================================================================
>========= Compiling...
> file.cpp
> \commoncpp2\src\file.cpp(1545) : error C2057: expected constant expression
> \commoncpp2\src\file.cpp(1545) : error C2466: cannot allocate an array of
> constant size 0 \commoncpp2\src\file.cpp(1545) : error C2133: 'left' :
> unknown size \commoncpp2\src\file.cpp(1583) : error C2057: expected
> constant expression \commoncpp2\src\file.cpp(1583) : error C2466: cannot
> allocate an array of constant size 0 \commoncpp2\src\file.cpp(1583) : error
> C2133: 'next_token' : unknown size
>
> ccgnu2d.dll - 6 error(s), 0 warning(s)
> ===========================================================================
>=========
>
> All this error in 2 lines looks like.
>
> void func(int size){
>         char left[size]; // Error there
> }
>
> I think in this lines needs dynamic memory allocation?
>
> ===========================================================================
>========= network.cpp
> d:\Program Files\Microsoft Visual Studio .NET
> 2003\Vc7\include\xutility(1136) : error C2679: binary '=' : no operator
> found which takes a right-hand operand of type 'const
> ost::NetworkDeviceInfo' (or there is no acceptable conversion) d:\Program
> Files\Microsoft Visual Studio .NET 2003\Vc7\include\vector(862) : see
> reference to function template instantiation 'void
> std::fill<std::vector<_Ty>::_Tptr,_Ty>(_FwdIt,_FwdIt,const _Ty &)' being
> compiled with
>         [
>             _Ty=ost::NetworkDeviceInfo,
>             _FwdIt=std::vector<ost::NetworkDeviceInfo>::_Tptr
>         ]
>         d:\Program Files\Microsoft Visual Studio .NET
> 2003\Vc7\include\vector(809) : while compiling class-template member
> function 'void
> std::vector<_Ty>::_Insert_n(std::vector<_Ty>::iterator,std::vector<_Ty>::si
>ze_type,const _Ty &)' with
>         [
>             _Ty=ost::NetworkDeviceInfo
>         ]
>         d:\Work\develop\ccpp_1.1.0\commoncpp2\src\network.cpp(84) : see
> reference to class template instantiation 'std::vector<_Ty>' being compiled
> with
>         [
>             _Ty=ost::NetworkDeviceInfo
>         ]
> ===========================================================================
>=========





reply via email to

[Prev in Thread] Current Thread [Next in Thread]