gcc 4.1.2 on OpenSuSE 10.2
Error during make:
[tt]
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/opt/kde3/include -I/usr/lib/qt3/include -I. -DQT_THREAD_SUPPORT -D_REENTRANT -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING -fno-strict-aliasing -pipe -Wdeclaration-after-statement -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib/perl5/5.8.8/i586-linux-thread-multi/CORE -Wnon-virtual-dtor -Wno-long-long -Wbad-function-cast -Wundef -Wall -W -Wpointer-arith -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -O2 -fno-exceptions -fno-check-new -Wno-write-strings -Wno-unused -c -o kperl.o `test -f 'kperl.cpp' || echo './'`kperl.cpp
cc1plus: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++
cc1plus: warning: command line option "-Wbad-function-cast" is valid for C/ObjC but not for C++
kperl.cpp: In function ‘void perl_init(KConfig*)’:
kperl.cpp:261: error: invalid conversion from ‘void (*)()’ to ‘void (*)(PerlInterpreter*)’
kperl.cpp:261: error: initializing argument 2 of ‘int perl_parse(PerlInterpreter*, void (*)(PerlInterpreter*), int, char**, char**)’
[/tt]
Line 261 of kperl.cpp:
I'd appreciate any help anyone could offer. I'm not a c++ programmer and some of this goes beyond me. This is from code from an author that has passed away and it _used_ to compile fine on earlier versions of gcc, though it complains more now and errors on the above.
Error during make:
[tt]
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/opt/kde3/include -I/usr/lib/qt3/include -I. -DQT_THREAD_SUPPORT -D_REENTRANT -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING -fno-strict-aliasing -pipe -Wdeclaration-after-statement -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib/perl5/5.8.8/i586-linux-thread-multi/CORE -Wnon-virtual-dtor -Wno-long-long -Wbad-function-cast -Wundef -Wall -W -Wpointer-arith -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -O2 -fno-exceptions -fno-check-new -Wno-write-strings -Wno-unused -c -o kperl.o `test -f 'kperl.cpp' || echo './'`kperl.cpp
cc1plus: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++
cc1plus: warning: command line option "-Wbad-function-cast" is valid for C/ObjC but not for C++
kperl.cpp: In function ‘void perl_init(KConfig*)’:
kperl.cpp:261: error: invalid conversion from ‘void (*)()’ to ‘void (*)(PerlInterpreter*)’
kperl.cpp:261: error: initializing argument 2 of ‘int perl_parse(PerlInterpreter*, void (*)(PerlInterpreter*), int, char**, char**)’
[/tt]
Line 261 of kperl.cpp:
Code:
perl_parse(my_perl, xs_init, 3, (char**)perl_args, (char **)NULL);
I'd appreciate any help anyone could offer. I'm not a c++ programmer and some of this goes beyond me. This is from code from an author that has passed away and it _used_ to compile fine on earlier versions of gcc, though it complains more now and errors on the above.