Re: [eclipse-clp-users] C++ interface and GCC 4.x

From: Kish Shen <kisshen_at_...5...>
Date: Tue, 10 Feb 2009 17:17:07 +0000
Chris Mears wrote:
> Hello all,
> The C++ interface doesn't work with recent versions of GCC using the
> default options.  For example, trying to compile the file
> (one of the examples included with Eclipse) results in the following
> errors:
> $ g++-4.1 -I${ECLIPSEDIR}/include/${ARCH} -L${ECLIPSEDIR}/lib/${ARCH} -leclipse
> In function ‘int main()’:
> error: ‘newvar’ was not declared in this scope
> error: ‘list’ was not declared in this scope
> error: ‘list’ was not declared in this scope
> error: declaration of ‘<typeprefixerror>list’
> error: conflicts with previous declaration ‘<typeprefixerror>list’
> The result is similar for g++-4.2 and g++-4.3.  The compilation succeeds
> with g++-3.3.
> The problem is due to a change explained here:
> , as the first point in the C++
> section.  Specifically:
>     ARM-style name-injection of friend declarations is no longer the
>     default. For example:
>           struct S {
>             friend void f();
>           };
>           void g() { f(); }
>     will not be accepted; instead a declaration of f will need to be
>     present outside of the scope of S. The new -ffriend-injection option
>     will enable the old behavior.
> Indeed, using the -ffriend-injection option does make Eclipse's C++
> interface work properly.
> The proper fix, I think, is to add declarations for functions like
> newvar, list etc. to Eclipse's C++ header file.  In the meantime, adding
> -ffriend-injection is a fine workaround.
> Chris Mears
> ------------------------------------------------------------------------------
> Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
> software. With Adobe AIR, Ajax developers can use existing skills and code to
> build responsive, highly engaging applications that combine the power of local
> resources and data with the reach of the web. Download the Adobe AIR SDK and
> Ajax docs to start building applications today-
> _______________________________________________
> ECLiPSe-CLP-Users mailing list
Hi Chris,

Thanks for finding the problem and identifying the cause. I think this 
will allow us to fix the problem!



This e-mail may contain confidential and privileged material for the
sole use of the intended recipient. Any review, use, distribution or
disclosure by others is strictly prohibited. If you are not the intended
recipient (or authorized to receive for the recipient), please contact
the sender by reply e-mail and delete all copies of this message.
Cisco Systems Limited (Company Number: 02558939), is registered in
England and Wales with its registered office at 1 Callaghan Square,
Cardiff, South Glamorgan CF10 5BT.
Received on Tue Feb 10 2009 - 17:17:16 CET

This archive was generated by hypermail 2.3.0 : Wed Jul 24 2019 - 09:15:05 CEST