niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » Programming » Perl » modules
Compiling modules for Windows?
Post new topic   Reply to topic Page 1 of 1 [3 Posts] View previous topic :: View next topic
Author Message
Neil Cherry
*nix forums beginner


Joined: 01 Apr 2005
Posts: 18

PostPosted: Sat Jul 08, 2006 1:28 am    Post subject: Compiling modules for Windows? Reply with quote

I need to create a Perl module for use under Windows (I think I know
how to do it for linux). Are there any tutorials? Can I use Openwatcom
as the C compiler? Can I use Cygwin as the C compiler (I think I need
to create a dll) ?

Any pointers would be great, thanks.

--
Linux Home Automation Neil Cherry ncherry@linuxha.com
http://www.linuxha.com/ Main site
http://linuxha.blogspot.com/ My HA Blog
http://home.comcast.net/~ncherry/ Backup site
Back to top
Sisyphus
*nix forums Guru


Joined: 04 Mar 2005
Posts: 503

PostPosted: Sat Jul 08, 2006 3:39 am    Post subject: Re: Compiling modules for Windows? Reply with quote

"Neil Cherry" <njc@cookie.uucp> wrote in message
news:slrneau2ip.q4j.njc@cookie.uucp...
Quote:
I need to create a Perl module for use under Windows (I think I know
how to do it for linux).

Same process for both Windows and linux:

perl Makefile.PL
make test
make install

However, you generally need to replace "make" (in the above commands) with
whatever 'perl -V:make' reports.

Quote:
Are there any tutorials? Can I use Openwatcom
as the C compiler? Can I use Cygwin as the C compiler (I think I need
to create a dll) ?


Cygwin's compiler (gcc) will be quite satisfactory iff you're using Cygwin
perl.

Generally, you need to use the compiler that 'perl -V:cc' reports.

However, if 'perl -V:cc' reports 'cl' and you don't have Microsoft's Visual
Studio, you could install (in order) 'dmake' (from
http://search.cpan.org/dist/dmake/ ), MinGW (from
http://www.mingw.org/download.shtml ), and ExtUtils::FakeConfig (from
http://search.cpan.org/~mbarbon/ExtUtils-FakeConfig-0.06/ ) and build the
module with:

perl -MConfig_m Makefile.PL
dmake test
dmake install

Or, if you have ActiveState perl build 815 or 817 (or later), there's
probably no need for ExtUtils::FakeConfig. Just install MinGW and dmake, and
run:

perl Makefile.PL
dmake test
dmake install

If you have ActiveState build 816, replace it with build 817. You can check
by running:
perl -e "print $ActivePerl::VERSION"

If you need to reply, could you please provide the output of 'perl -V' so
that we can see the details of your perl.

(Yet another alternative ... if you want to use 'cl' but don't have it, you
can download a free command line version of Visual Studio from Microsoft.
Not sure of how much milage you get, and I don't have details at hand -
though someone else may well provide them. In any case you should be able to
Google up something ... or check the Readme.win32 in the perl source. Imho,
the 'dmake/MinGW' path is preferable - easier installation and uses the same
runtime as ActiveState's compiler.)

Cheers,
Rob
Back to top
Neil Cherry
*nix forums beginner


Joined: 01 Apr 2005
Posts: 18

PostPosted: Sun Jul 09, 2006 5:28 pm    Post subject: Re: Compiling modules for Windows? Reply with quote

On Sat, 8 Jul 2006 13:39:21 +1000, Sisyphus wrote:

Quote:
Rob

Rob, thanks that's a world of information that I couldn't find
easily. This will go a long way towards helping me create modules that
are portable for Linux, Mac and Windows.

Thanks again!

--
Linux Home Automation Neil Cherry ncherry@linuxha.com
http://www.linuxha.com/ Main site
http://linuxha.blogspot.com/ My HA Blog
http://home.comcast.net/~ncherry/ Backup site
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [3 Posts] View previous topic :: View next topic
The time now is Sun Nov 23, 2008 1:17 pm | All times are GMT
navigation Forum index » Programming » Perl » modules
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts problem with windows installer Christian Rengstl PostgreSQL 0 Fri Jul 21, 2006 10:55 am
No new posts Problem with Win32-SerialPort over bluetooth @ windows + ... ctloh Perl 0 Fri Jul 21, 2006 8:08 am
No new posts Capturing user login Information of windows sachin PHP 3 Fri Jul 21, 2006 5:44 am
No new posts AIX-Windows Rainer Rösch AIX 1 Thu Jul 20, 2006 8:38 am
No new posts problem loading DSO modules Mauro Apache 5 Thu Jul 20, 2006 8:12 am

Personal Loans | Home Loan | Loans | Facebook Proxy | Bad Credit Loan
Copyright © 2004-2005 DeniX Solutions SRL
 
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum | 
Privacy Policy


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1778s ][ Queries: 16 (0.0968s) ][ GZIP on - Debug on ]