During building some code I get "... should have been declared inside ..."
Adrian Stel
adisan82@gmail.com
Tue Oct 20 15:19:00 GMT 2009
Hi Axel,
you are right :), thanks for helping me.
Now I have new issues but I will try to fix it solo :)
Of course if I will get "hard" issues, I will not hesitate to contact
with you :)
Best Regards
Adrian
2009/10/20 Axel Freyn <axel-freyn@gmx.de>
>
> Hi Adrian
> >
> > I get some code, I'm able to build this code on gcc412 without any
> > errors (debian4 x86_64), but when I try build the same code on gcc432
> > (debian 5 x86_64) I get:
> >
> > ServiceConfiguration.cxx:39: error: ‘void* glite::config::service_main(
> > void*)’ should have been declared inside ‘glite::config’.
> >
> > The problem is that I cant not force developers to improves this code
> > because they are support only SLC5 (with gcc412) :(
> I fear that's the only possibility: the code is no valid C++, gcc-4.1
> did accept it, later versions don't do it anymore: You are not allowed
> to define a function inside a namespace outside the namespace :-)
>
> void *glite::config::service_main(void * data);
> is invalid, you need instead
>
> namespace glite{
> namespace config{
> void *service_main(void * data);
> }
> }
>
> At least to my knowledge there is nothing else you can do:-(
> > This softvare org.glite.data.config-service could be downloaded from:
> >
> > cvs -d :pserver:anonymous@glite.cvs.cern.ch:/cvs/glite co -r
> > glite-data-config-service_R_2_4_0_1 org.glite.data.config-service
>
> Axel
More information about the Gcc-help
mailing list