Hi All
1) h2xs -n modulefolder sam.h
2) modifyimg the makefile.pl by adding
PROTOTYPES:ENABLE
int
fnSam(void)
and also modifying the include statement as
#include "sam.h"
3) modify the .xs file by adding the OBJECT mapping and have to also comment
the VERSION_FROM for being able to compile the makefile.pl otherwise it
gives an error saying
Could not open 'lib/trymodule.pm':
No such file or directory at
c:\perl\lib\ExtUtils\MM_Unix.pm line 3079
4) run perl makefile.pl
which creates the makefile
5) run nmake15
this creates the nmake.exe,nmake.err and readme.txt
6) run nmake
which says the makefile is up-to-date
What is to be done next????
In the documents i find the "make install" step but there is no makefile
created by the name
install.
And also there is no blilb folder created which gets creted if a ifollow
these steps on cmd.
From: "Sisyphus" <[EMAIL PROTECTED]>
To: "sam joseph" <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>,
<beginners@perl.org>
Subject: Re: Urgent help in h2xs
Date: Mon, 3 Oct 2005 18:11:33 +1000
----- Original Message -----
From: "sam joseph" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <beginners@perl.org>;
<[EMAIL PROTECTED]>
Sent: Monday, October 03, 2005 12:58 AM
Subject: Re: Urgent help in h2xs
> Hi All
>
> I appreciate your help
>
> I have MSVC++ version 6.0
Ok - did you get it set up correctly so that you can use it to build perl
modules ? Can you build (eg) Math::FFT from the source tarball on cpan ?
>
> Can you be more precise in telling how to use VC++ for h2xs as i dont
have
> much prior working experience in VC++ except for some basic C++ coding.
>
'h2xs' is simply a batch file you run when you want to create your own perl
XS module. It just creates the basics of the files that you're going to
need.
Start with 'perldoc perlxstut'. Work through the examples it contains.
There's no fast way to be able to write XS code. It takes time and effort.
Another way, with a learning curve that is not so steep, is to use
Inline::C - which autogenerates the actual XS code for you, and then
compiles and runs it automatically for you, too. It comes with a cookbook
of
examples (perldoc Inline::C-Cookbook) that show, among other things, how to
access functions in Windows dll's. It also requires that you have your C
compiler set up correctly. I recommend that you take that approach. (Again,
there are some things to learn.)
>
> I have made a default dll project which has a default exported method.
Probably the quickest way you'll be able to access that exported function
from perl on Win32 is to use Win32::API (which doesn't need VC++, or any
other compiler, at all). It's a quick and dirty way of getting the job
done - and I would prefer to see you use Inline::C or XS. But lots of
people
use Win32::API and get good milage from it. I think it still requires that
your dll functions use the __stdcall calling conventions, which just means
that you include -Gz command line switch when building the dll. I don't
know
how you invoke the __stdcall calling convention if you build the dll using
the Visual Studio IDE (point & click) - but there would be a way.
Cheers,
Rob
_________________________________________________________________
Get your own space on the web. Logon to MSN Spaces.
http://spaces.msn.com/?mkt=en-in Share files, photos, ideas etc
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>