Click here to get back home

Perl MakeMaker - how to force Perl linking with the static C library (libcrt.lib) instead of dynamic C library (msvcrt.lib)

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Perl MakeMaker - how to force Perl linking with the static C library (libcrt.lib) instead of dynamic C library (msvcrt.lib) Avi 04-17-2007
Posted by Avi on April 17, 2007, 5:22 pm
Please log in for more thread options


Hi,

I'm building a Perl extension (dll in Windows XP) using
ExtUtils::MakeMaker.
This dll needs to link with other libraries that were built in static
mode (-MTd).
My perl configuration states dynamic libraries (-MD) which causes
MakeMaker to pull a dynamic C library (msvcrtd.dll).
The other libraries are using the static C library (libcmtd.lib)
These dynamic and static C libraries collide giving link errors.

Is there a way to force perl to compile with (-MTd) albeit its
configuration flags?
I tried reinstalling Perl (ActiveState perl v5.8.8 built for MSWin32-
x86-multi-thread) but didn't see an option to control the
configuration flags.
Also, my platform supports both dynamic (-MD) and static (-MTd)
builds. Does this mean that I have to maintain two versions of Perl?


Thanks,

Avner


Posted by Reinhard Pagitsch on April 19, 2007, 4:41 am
Please log in for more thread options


Avi wrote:
> Hi,
>
> I'm building a Perl extension (dll in Windows XP) using
> ExtUtils::MakeMaker.
> This dll needs to link with other libraries that were built in static
> mode (-MTd).
> My perl configuration states dynamic libraries (-MD) which causes
> MakeMaker to pull a dynamic C library (msvcrtd.dll).
> The other libraries are using the static C library (libcmtd.lib)
> These dynamic and static C libraries collide giving link errors.
>
> Is there a way to force perl to compile with (-MTd) albeit its
> configuration flags?
> I tried reinstalling Perl (ActiveState perl v5.8.8 built for MSWin32-
> x86-multi-thread) but didn't see an option to control the
> configuration flags.
> Also, my platform supports both dynamic (-MD) and static (-MTd)
> builds. Does this mean that I have to maintain two versions of Perl?
>
>
> Thanks,
>
> Avner
>

Have you tried:
perl Makefile.PL LINKTYPE=static
nmake

(perldoc -m ExtUtils::MakeMaker|grep LINKTYPE)

regards,
Reinhard

--
PM Mails an rpirpag <at> gmx dot at

Similar ThreadsPosted
http, library loaded, httpS library can't be found November 8, 2004, 9:51 am
How to get GIF support with Perl-GD library? (Can't locate object method "newFromGif") June 5, 2007, 4:22 am
Using a .SO library with Inline January 28, 2005, 12:55 pm
Callback from threaded c-library February 21, 2005, 3:18 pm
library not found in openssl May 21, 2006, 12:59 am
In search of working IM library July 26, 2006, 3:43 pm
finding version number of a library August 10, 2007, 6:54 am
Win32::GUI newbie question re dynamic GUI building October 6, 2005, 8:44 pm
How to Add dynamic array/hashes to Curses::UI:Listbox -lables January 5, 2008, 1:40 am
Using the Force November 8, 2004, 11:07 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap