----- Original Message ----- 
From: "Roman Luz" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Thursday, August 18, 2005 4:35 AM
Subject: setting up activeState perl, make, and a C++ compiler


> I'd like to be able to download modules from CPAN and make them
> manually, but I get a lot of errors when I try to do this.

If you want to build modules on ActiveState perl using only free tools, the
best thing to do is:
1) Install dmake from  http://search.cpan.org/dist/dmake/ . Make sure you
install as per instructions in the Readme, and add the directory that
contains dmake.exe to your path. (You can alternatively use 'nmake', which
is also freely available - Google for it.)

2) Install MinGW. Download 'MinGW-4.1.1.exe' from
http://www.mingw.org/download.shtml and run the downloaded executable to
install MinGW to the location of your choice. Probably simplest to accept a
'Full Installation', though that will give you gcc-java, and gcc-ada amongst
other things that you're unlikely to need. But if you accept a Full Install
then you're guaranteed to have installed everything you need. Again, make
sure that the MinGW/bin folder is added to your path.

3) Install ExtUtils::FakeConfig from CPAN, according to the instructions in
the Readme.

4) To check that everything is set up ok, grab Math::FFT from CPAN and build
it by running:

     perl -MConfig_m Makefile.PL
     dmake test
     dmake install

If that builds, tests and installs ok, then you've got everything set up
correctly - otherwise something is not set up correctly. (It doesn't have to
be Math::FFT - I specify it simply because I know it builds reliably,
doesn't have any pre-requisites, and tests the set-up thoroughly.)

The idea is that whenever you want to build a module you start with
'perl -MConfig_m Makefile.PL', but you can dispense with '-MConfig_m' option
when it comes to running your scripts, etc.

>
> I've copied the necessary *.h files from the win32api library from
> MinGW into my C:\Perl\lib\CORE folder.  And I'm using the Microsoft
> Visual C++ Toolkit 2003 for my cl and link functions.  Is this a bad
> combination?

Well ... it's less than ideal, especially the copying of header files into
the Perl/lib/CORE folder. You would be better to use the header files from
Visual C++ Toolkit 2003 and leave them where they are. You'll get pretty
good milage out of Microsoft's free compiler, but you'll get better milage
with MinGW and ExtUtils::FakeConfig. In addition to that, it's a nightmare
trying to find and correctly set up all of the free stuff needed to get a
fully functioning Microsoft VC++ command line  compiler.

If you want to use that free Microsoft compiler, you really should build
your perl from source, using that compiler.

>
> For example, I'd like to install the PAR module.

I recently built PAR-0.89 with AS perl using the method detailed above. To
do that successfully, I had to amend myldr/static.c. Near the top of that
file I had to change:

#ifdef WIN32
# include <process.h>
# define mkdir(file, mode) _mkdir(file)
#endif

to:

#ifdef WIN32
# include <io.h>
# include <process.h>
# define mkdir(file, mode) _mkdir(file)
#endif

Cheers,
Rob

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

Reply via email to