>From the look of it - the code compiled ok on your system but your
linker is squealing like a stuck pig :-). I don't know that much about
Win32 compiling systems, but you need to find some info ( maybe from
www.activestate.com ) about what compilers/linkers you should be using.
CHeers.
On Tue, Aug 27, 2002 at 06:44:38PM -0700, Yimeng Dou wrote:
> Hi,
>
> Here is the C code, and the out.make file in the build directory.
>
> /*
> * This file was generated automatically by xsubpp version 1.9508 from the
> * contents of try_pl_419e.xs. Do not edit this file, edit try_pl_419e.xs
> instead.
> *
> * ANY CHANGES MADE HERE WILL BE LOST!
> *
> */
>
> #line 1 "try_pl_419e.xs"
> #include "EXTERN.h"
> #include "perl.h"
> #include "XSUB.h"
> #include "INLINE.h"
> void greet() {
> printf("Hello, world\n");
> }
> #line 18 "try_pl_419e.c"
> XS(XS_main_greet)
> {
> dXSARGS;
> if (items != 0)
> Perl_croak(aTHX_ "Usage: main::greet()");
> SP -= items;
> {
> #line 16 "try_pl_419e.xs"
> I32* temp;
> #line 28 "try_pl_419e.c"
> #line 18 "try_pl_419e.xs"
> temp = PL_markstack_ptr++;
> greet();
> if (PL_markstack_ptr != temp) {
> /* truly void, because dXSARGS not invoked */
> PL_markstack_ptr = temp;
> XSRETURN_EMPTY; /* return empty stack */
> }
> /* must have used dXSARGS; list context implied */
> return; /* assume stack size is correct */
> #line 39 "try_pl_419e.c"
> PUTBACK;
> return;
> }
> }
>
> #ifdef __cplusplus
> extern "C"
> #endif
> XS(boot_try_pl_419e)
> {
> dXSARGS;
> char* file = __FILE__;
>
> XS_VERSION_BOOTCHECK ;
>
> newXS("main::greet", XS_main_greet, file);
> XSRETURN_YES;
> }
> =================================================================
>
> out.make file:
>
>
> Microsoft (R) Program Maintenance Utility Version 6.00.8168.0
> Copyright (C) Microsoft Corp 1988-1998. All rights reserved.
>
> C:\Perl\bin\perl.exe -IC:\Perl\lib -IC:\Perl\lib
> C:\Perl\lib\ExtUtils/xsubpp -typemap C:\Perl\lib/ExtUtils/typemap
> try_pl_419e.xs > try_pl_419e.xsc &&
> C:\Perl\bin\perl.exe -IC:\Perl\lib -IC:\Perl\lib -MExtUtils::Command -e mv
> try_pl_419e.xsc try_pl_419e.c
>
> cl -c -IC:/Perl/examples -nologo -O1 -MD -DNDEBUG -DWIN32 -D_CONSOLE -DNO_ST
> RICT -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DPERL_MS
> VCRT_READFIX -O1 -MD -DNDEBUG -DVERSION=\"0.00\" -DXS_VERSION=\"0.00\"
> -IC:\Perl\lib\CORE try_pl_419e.c
> try_pl_419e.c
> "Running Mkbootstrap for try_pl_419e ()"
> C:\Perl\bin\perl.exe -IC:\Perl\lib -IC:\Perl\lib -MExtUtils::Command -e
> chmod 644 try_pl_419e.bs
> C:\Perl\bin\perl.exe "-IC:\Perl\lib"
> -IC:\Perl\lib" -MExtUtils::Mksymlists -e "Mksymlists('NAME' =>
> 'try_pl_419e', 'DLBASE' => 'try_pl_419e', 'DL_FUNCS' => { }, 'FUNCLIST' =>
> [], 'IMPORTS' => { }, 'DL_VARS' => []);"
>
> link -out:blib\arch\auto\try_pl_419e\try_pl_419e.dll -dll -nologo -nodefault
> lib -release -libpath:"C:/Perl\lib\CORE" -machine:x86 try_pl_419e.obj
> C:\Perl\lib\CORE\perl56.lib oldnames.lib kernel32.lib user32.lib gdi32.lib
> winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib
> netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib version.lib odbc32.lib
> odbccp32.lib msvcrt.lib -def:try_pl_419e.def
>
> OPTLINK (R) for Win32 Release 7.50.6
> Copyright (C) Symantec Corporation 1989-97 All rights reserved.
> OPTLINK : Warning 9: Unknown Option : OUT
> OPTLINK : Warning 9: Unknown Option : DLL
> OPTLINK : Warning 9: Unknown Option : RELEASE
> OPTLINK : Warning 9: Unknown Option : LIBPATH
> OPTLINK : Warning 9: Unknown Option : PERL\LIB\CORE
> :blib\arch\auto\try_pl_419e\try_pl_419e.dll
> Error 2: File Not Found :blib\arch\auto\try_pl_419e\try_pl_419e.dll
> NMAKE : fatal error U1077: 'link' : return code '0x1'
> Stop.
>
> -----Original Message-----
> From: Piers Harding [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, August 27, 2002 12:59 PM
> To: Piers Harding
> Cc: Yimeng Dou; [EMAIL PROTECTED]
> Subject: Re: Simple Inline C Problem.
>
>
> OK.
>
> What are you running this on. The code I gave you was run under Linux
> RH7.3 + perl 5.6.1 + Inline 0.43.
>
> you could also trygiving us some of the output from the _Inline
> directory ( located from where you are running that script ).
>
> CHeers.
>
>
> On Tue, Aug 27, 2002 at 07:43:21PM +0100, Piers Harding wrote:
> >
> > Try it like this:
> >
> > use Inline C;
> > greet();
> > __END__
> > __C__
> > void greet() {
> > printf("Hello, world\n");
> > }
> >
> >
> >
> > Cheers.
> >
> > On Tue, Aug 27, 2002 at 11:12:53AM -0700, Yimeng Dou wrote:
> > > I have this very simple inline C code, but somehow
> > > it doesn't work.
> > >
> > > I receive "INIT failed--call queue aborted." when I run it.
> > >
> > > Here is the code, please help. Thanks!
> > >
> > > use Inline C;
> > > __END__
> > > __C__
> > > void greet() {
> > > printf("Hello, world\n");
> > > }
> > > greet;
> > >
> > >
> > > -------------------------------------------------
> > > Yimeng Dou
> > > [EMAIL PROTECTED]
> > > Department of Information and Computer Science
> > > University of California, Irvine