----- Original Message ----- 
From: "Bernard Kenik" <[EMAIL PROTECTED]>
.
.
>
> What I am really trying to do is access a DLL which has one entry point.
> The C prototype for the function is:  char *func(char * strp)
>
> Question: Should the compiler be the same as the compiler which made the
> dll? I have minimum information!!!
>

No, it won't matter if a different compiler is used.

> I have tried . Win32::API, Win32:API:Prototype
>

I don't use either extensively. I think there are still problems with
Win32::API if the dll wasn't built with stdcall calling convention (which
may well be the case with this specific dll) - though I think someone has
made a patched version of Win32::API that doesn't require the stdcall
convention. Googling for Win32::API and stdcall might turn it up.

>
> My latest attempt is to learn how to use Inline module which claims
> to be easier than both XS and SWIG.
>

I use Inline a lot and I think that's a valid claim. It's also good for
accessing functions in dll's. (There's a good example in the Cookbook that
comes with the Inline source.)
I don't know anything about swig, but with both xs and Inline::C, you'll
need an import lib (.lib) as well as the dll to access the function, if you
use a MIcrosoft compiler. MinGW (gcc) will probably access the function
directly from the dll, but that's not possible with a Microsoft compiler.
However, it's probably not difficult to create an import lib from the dll.


>
> LINK : error LNK2001: unresolved external symbol [EMAIL PROTECTED]
> blib\arch\auto\ans_pl_d0f9\ans_pl_d0f9.dll : fatal error LNK1120: 2
> unresolved externals
> NMAKE : fatal error U1077: 'C:\WINDOWS\system32\cmd.exe' : return code
> '0x460'
> Stop.
>

Still looks to me like a problem with the compiler. Best to install Inline
from the cpan source, rather than the ppm. When you do that, you will
probably find that 'nmake test' produces similar failures.

Cheers,
Rob

_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to