Re: Calling External DLL functions in Perl using Inline




"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


.



Relevant Pages

  • Re: Calling External DLL functions in Perl using Inline
    ... >> Starting Build Compile Stage ... > (I think it might have been created when you built the dll ... ... Note (probably harmless): ...
    (comp.lang.perl.modules)
  • Re: Blackice MFC Application
    ... >> When clicking on blackice help I notice the above application attempts to ... > DLL and its autodownloading it from MS. ... Thank you for information...it seems its harmless afterall... ...
    (comp.security.firewalls)