PerlDiscuss - Perl Newsgroups and mailing lists <[EMAIL PROTECTED]> writes:
>Sisyphus wrote:
>
>> PerlDiscuss - Perl Newsgroups and mailing lists wrote:
>> > Hello ,
>> > 
>> >  I am new in using PERLXS facility.
>> > 
>> >  I am trying example 4 of perlxstut  on win32(nt4) with Perl 5.8.3 build
>> > from activestate with Mingw32,dmake and FakeConfig 

ActivePerl is build with Visual C++ and nmake,
so MakeMaker etc. generate nmake compatible Makefiles.

You could try editing Config.pm and setting make=dmake
(You may also have to change cc to gcc and a few other things.

Or:
  - use Microsoft Compiler ($)
  - build your own perl with MinGW and dmake

>> > dmake.exe:  Error -- Don't know how to make `static'
>> > dmake.exe:  Error code 255, while making 'mylib/libmylib.a'
>> > dmake.exe:  'mylib/libmylib.a' removed.
>> > 
>
>> I have a perl built with MinGW and dmake - and I get essentially the 
>> same error when running example 4. I think it's a 'dmake' thing.

Yes.

>
>
>> You might instead consider putting your efforts into learning how to use 
>> Inline::C - which basically autogenerates the XS code for you and then 
>> compiles it. There's still a bit to learn - but I found it to be more 
>> coherent than XS and it comes with a nice little cookbook (perldoc 
>> Inline::C-Cookbook). Of course, without knowing exactly what you're 
>> trying to do, it would be wrong to state categorically that Inline::C is 
>> what you *should* be using.

My guess is that Inline::C is going to believe Config.pm about how 
to compile C code. So on ActivePerl it is going to use 'cl' 
unless you hack Config.pm

>
>
>What i need is call ,from PERL scripts , C ActiveDirectory LDAP query
>functions , as under Win32_Perl ,secure authenticating against AD is not 
>obvious... . C subroutines will return data structures such as tied lists .
>Regards ,

There are perl modules on CPAN for LDAP. As LDAP is a socket level 
thing a pure perl approach _should_ work.

If you are trying to call a C library using MingGW _should_ work,
but you may need to convert .lib files to .a files or regenerate 
import .a from the .dll
If library is C++ things get more tricky - I think G++ and VC++ 
use different interfaces :-(


Reply via email to