<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
Hi guys,<br><br>This is my first post to this list.&nbsp; I'm not an expert in Perl and definitely a beginner with C.&nbsp; I'm trying to rewrite a short section of some Perl code in C, but I've bumped into the following issue:<br><br><blockquote>#!/usr/bin/perl -w<br><br>use Inline C;<br>use strict;<br><br>hello_inline();<br><br>__END__<br>__C__<br>#include &lt;stdio.h&gt;<br><br>void hello_inline( ) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; printf( "Hello World. Best Regards from Inline\n" );<br>}<br></blockquote><br>The above code works fine, and the output is:<br><blockquote>plxc1000&gt; test_c3.pl<br>Hello World. Best Regards from Inline<br></blockquote><br>However, the following code (adding the search.h header file):<br><br><blockquote>#!/usr/bin/perl -w<br><br>
use Inline C;<br>
use strict;<br><br>
hello_inline();<br><br>
__END__<br>
__C__<br>
#include &lt;stdio.h&gt;<br>#include &lt;search.h&gt;<br><br>
void hello_inline( ) {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; printf( "Hello World. Best Regards from Inline\n" );<br>
}<br></blockquote>



<br>Results in this output:<br><blockquote>plxc1000&gt; test_c3.pl<br>/usr/bin/perl /usr/lib/perl5/5.8.3/ExtUtils/xsubpp&nbsp; -typemap /usr/lib/perl5/5.8.3/ExtUtils/typemap&nbsp;&nbsp; test_c3_pl_f52f.xs &gt; test_c3_pl_f52f.xsc &amp;&amp; mv test_c3_pl_f52f.xsc test_c3_pl_f52f.c<br>cc -c&nbsp; -I/nfs/pdx/disks/nehalem.pde.077/projects/rapttr/src -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -fmessage-length=0 -Wall -Wall -pipe&nbsp;&nbsp; -DVERSION=\"0.00\" -DXS_VERSION=\"0.00\" -fPIC "-I/usr/lib/perl5/5.8.3/x86_64-linux-thread-multi/CORE"&nbsp;&nbsp; test_c3_pl_f52f.c<br>In file included from test_c3_pl_f52f.xs:6:<br>/usr/include/search.h:66: error: `Perl_push_scope' redeclared as different kind of symbol<br>/usr/lib/perl5/5.8.3/x86_64-linux-thread-multi/CORE/proto.h:590: error: previous declaration of `Perl_push_scope'<br>/usr/include/search.h:66: error: parse error before '(' token<br>make: *** [test_c3_pl_f52f.o] Error 1<br><br>A problem was encountered while attempting to compile and install your Inline<br>C code. The command that failed was:<br>&nbsp; make &gt; out.make 2&gt;&amp;1<br></blockquote><br>Looking through the search.h header file, I don't see any instance of Perl_push_scope being redeclared, especially not on line 66 (which seems to be the middle of an enum type declaration).&nbsp; I have not modified any of these header files.&nbsp; This is on SUSE LINUX Enterprise Server 9 (x86_64).&nbsp; <br><br>Any ideas to help out a new guy? :)&nbsp; Let me know if I missed information I should provide when asking this type of question and I'll make certain to make certain to provide everything you guys need in the future.&nbsp; I appreciate the help!<br><br>Thomas<br><br><br /><hr />Insert movie times and more without leaving HotmailŪ. <a href='http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=TXT_TAGLM_WL_HM_Tutorial_QuickAdd1_052009' target='_new'>See how.</a></body>
</html>