Re: Calling External DLL functions in Perl using Inline
- From: "Sisyphus" <sisyphus1@xxxxxxxxxxxxxxxxx>
- Date: Wed, 13 Jul 2005 13:26:59 +1000
"Sankaran" <psankarv@xxxxxxxxx> wrote in message
news:1121150272.130243.17400@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Starting Build Compile Stage
> Starting "perl Makefile.PL" Stage
> Note (probably harmless): No library found for '-lInlinetestLib'
Nope - it's not harmless. InlinetestLib.lib needs to be found. Where is it ?
(I think it might have been created when you built the dll ... but I'm not
sure about that.)
If you don't have it, can you tell me how the dll was built - ie which
command(s) did you run.
[snip]
> Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8804 for
> 80x86
> Copyright (C) Microsoft Corp 1984-1998. All rights reserved.
>
> Hello_Pl_5dd0.c
>
E:/Sankaran/Work/TP-TAImpacts-LM051049/PerlInline/MyTest1\InlinetestLib.h(15
)
> :
> error C2054: expected '(' to follow 'class'
>
E:/Sankaran/Work/TP-TAImpacts-LM051049/PerlInline/MyTest1\InlinetestLib.h(15
)
> :
> error C2085: 'CInlinetestLib' : not in formal parameter list
>
E:/Sankaran/Work/TP-TAImpacts-LM051049/PerlInline/MyTest1\InlinetestLib.h(15
)
> :
> error C2143: syntax error : missing ';' before '{'
> NMAKE : fatal error U1077: 'cl' : return code '0x2'
> Stop.
The compiler doesn't like the way InlineTestLib.h is written. Did you get
the same problems when you built the dll ?
> ________________________________________________________
> for the below modified program...
> use warnings;
>
> use Inline C => Config =>
> LIBS => '-L\E:\Sankaran\Work\TP-TAImpacts-LM051049\PerlInline\MyTest1
> -lInlinetestLib',
The location is incorrectly specified. Perhaps that's why the file can't be
found. Should be:
LIBS => '-LE:\Sankaran\Work\TP-TAImpacts-LM051049\PerlInline\MyTest1
> INC => '-I\E:\Sankaran\Work\TP-TAImpacts-LM051049\PerlInline\MyTest1',
Change to:
INC => '-IE:\Sankaran\Work\TP-TAImpacts-LM051049\PerlInline\MyTest1',
> BUILD_NOISY => 1;
>
> use Inline C => <<'EOC';
>
> #include "InlinetestLib.h"
> void greet(){
> int nId = fnInlinetestLib();
> printf ("%d", nId);
> printf("Hello, world from Perl Inline, By Sankaran\n");
>
> }
> EOC
> greet();
> __END__
> ________________________________________________________
>
Cheers,
Rob
.
- Follow-Ups:
- Re: Calling External DLL functions in Perl using Inline
- From: ben . sommer
- Re: Calling External DLL functions in Perl using Inline
- References:
- Calling External DLL functions in Perl using Inline
- From: Sankaran
- Re: Calling External DLL functions in Perl using Inline
- From: Sisyphus
- Re: Calling External DLL functions in Perl using Inline
- From: Sankaran
- Calling External DLL functions in Perl using Inline
- Prev by Date: Net::SSH::Perl extremely slow?
- Next by Date: Re: GD.pm Makefile not installing GD::Polyline
- Previous by thread: Re: Calling External DLL functions in Perl using Inline
- Next by thread: Re: Calling External DLL functions in Perl using Inline
- Index(es):
Relevant Pages
|