Re: Calling External DLL functions in Perl using Inline
- From: "Sisyphus" <sisyphus1@xxxxxxxxxxxxxxxxx>
- Date: Fri, 22 Jul 2005 19:13:15 +1000
<ben.sommer@xxxxxxx>
>
>
> Hi All.
>
> I'm just wondering how this problem resolved for you, Sankaran. I have
> the (almost) exact same problem, though my environment is cygwin+gcc.
Brian McCauley suggested the specific problem to which you allude was the
result of trying to process C++ source code with the compiler in C mode. If
that's so (and I've seen a couple of other posts suggesting the same thing)
then I think the solution would be to either convert the C++ source to C, or
use Inline::CPP.
With gcc, you need to be compiling C++ code with g++, not gcc - so if,
during the installation of Inline::CPP, you're prompted for which compiler
to use, make sure that g++ is specified.
So ..... I guess the advice is for you to use Inline::CPP if the source is
C++. If the source is C and you're still getting those errors, then let us
know.
> The user32.dll example from the Inline docs works flawlessly for me as
> well.
That's C code, so one would expect no problem there.
>Also, for my application, any conceivable permutation of the INC
> or LIBS directives (and windows/cygwin LIB/INC/PATH environment
> variables) always results in this:
>
> Note (probably harmless): No library found for '-lMyLib'
>
Sometimes that warning actually *is* harmless - I see it from time to time,
but I only ever take notice of it whenever 'MyLib' is not found.
If the lib is not being found, have you tried:
LIBS => '-L/full_path/to_MyLib -lMyLib',
If you specify '-lMyLib', will gcc find a file called 'MyLib.a', or will it
find only a file named 'libMyLib.a' ? (I think it will find either, but you
might check on that in case there's a problem there.)
Let us know how you get on with this.
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
- Re: Calling External DLL functions in Perl using Inline
- From: Sisyphus
- Re: Calling External DLL functions in Perl using Inline
- From: ben . sommer
- Calling External DLL functions in Perl using Inline
- Prev by Date: HTML::Template and __ODD__
- Next by Date: Re: HTML::Template and __ODD__
- 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
|