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 eg_cc_main.cc file > (one of the examples included with Eclipse) results in the following > errors: > > $ g++-4.1 eg_cc_main.cc -I${ECLIPSEDIR}/include/${ARCH} -L${ECLIPSEDIR}/lib/${ARCH} -leclipse > eg_cc_main.cc: In function ‘int main()’: > eg_cc_main.cc:55: error: ‘newvar’ was not declared in this scope > eg_cc_main.cc:59: error: ‘list’ was not declared in this scope > eg_cc_main.cc:59: error: ‘list’ was not declared in this scope > eg_cc_main.cc:59: error: declaration of ‘<typeprefixerror>list’ > eg_cc_main.cc:59: 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: > http://gcc.gnu.org/gcc-4.1/changes.html , 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-http://p.sf.net/sfu/adobe-com > _______________________________________________ > ECLiPSe-CLP-Users mailing list > ECLiPSe-CLP-Users_at_lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/eclipse-clp-users Hi Chris, Thanks for finding the problem and identifying the cause. I think this will allow us to fix the problem! Cheers, Kish -- 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 Sep 25 2024 - 15:13:20 CEST