Thank you for your reply. See inline comments.
----- Original Message -----
From: "Bernard Kenik" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Monday, October 24, 2005 1:21 PM
Subject: Need help with h2xs and XS
I am currently trying to learn how to use XS.
I am reading and doing the examples in the perlxstut.
So far I have not been able to do example1.
I am using Windows XP with Service Pack 2 on eMachine with an AMD64 cpu
ActivePerl 5.8.7
VC++ 2003 Toolkit
VC++ 2003 Platform SDK
Example 1 should be straightforward to do. Perhaps there's something wrong
with your VC++ 2003 configuration. Can you build Math::FFT from cpan ? If
so, that would indicate that the compiler is probably set up correctly
(and
we need to look a little closer at why the failure occurs). If not, then
there may be something amiss - in which case it would be a good idea to
read
the Readme.win32 that ships with the perl sources - especially the
sections
that cover the requirements re the free VC++ 2003 compiler.
I believe as you've suggested that the problem lies within the VC++ Platform
SDK.
When on the Microsoft web site to download the SDK, there is a reference to
earlier
versions of the SDK. I went there and found a list of SDKs. One the previous
version, about
3 version earlier than the latest one is said to be last one which will
support VC++ 6.00
compiler.
I ordered a CD of that version since it is no longer available for online
download.
Had to pay for shipping. .. the CD is free.
Will let you know if that works.
Imho, if you want to use a compiler other than MSVC++ 6.0 with ActiveState
perl, then the simplest approach is to install and use dmake, MinGW, and
ExtUtils::FakeConfig. (That will also give you better milage.)
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!!!
I have tried . Win32::API, Win32:API:Prototype
Win32::API::Prototype quits with a statement that it cannot
handle the return type.
Win32::API does access the dll but ActivePerl crashes when the function is
called.
Hence my attempts to learn XS .. this has been empaired due the difficulty
mentioned above.
I have also tried to learn SWIG .. its first example also failed when it
tries to
read (parse ?) some of the ActivePerl header files (*.h).
Did not pursue it any further although it claims to be easier then XS.
My latest attempt is to learn how to use Inline module which claims
to be easier than both XS and SWIG.
The first example on the manpage fails in almost the same manner as XS.
The XS has 3 unresolved external symbols instead of 2.
These 2 are common in both cases.
Guess this is probably due to the VC++ Platform SDK that I am using.
__part of the output
Creating library blib\arch\auto\ans_pl_d0f9\ans_pl_d0f9.lib and
object blib\arch\auto\ans_pl_d0f9\ans_pl_d0f9.exp
ans_pl_d0f9.obj : error LNK2019: unresolved external symbol _strcmp
referenced in function _boot_ans_pl_d0f9
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.
A problem was encountered while attempting to compile and install your
Inline
C code. The command that failed was:
nmake > out.make 2>&1
The build directory was:
C:\Inline\Tutorial\_Inline\build\ans_pl_d0f9
To debug the problem, cd to the build directory, and inspect the output
files.
at ans.pl line 0
INIT failed--call queue aborted.
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs