f



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

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

0
4/17/2007 9:22:42 PM
comp.lang.perl.modules 4194 articles. 0 followers. jerrykrinock (6) is leader. Post Follow

1 Replies
720 Views

Similar Articles

[PageSpeed] 42

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
0
rprp (22)
4/19/2007 8:41:58 AM
Reply:

Similar Artilces:

install_driver(Oracle) failed: Can't load 'C:/Perl/site/lib/auto/DBD/Oracle/Oracle.dll' for module DBD::Oracle: load_file:The specified procedure could not be found at C:/Perl/lib/DynaLoader.pm line 2
hello i have a strange problem with DBI module. has anyone any clue about what is wrong here? my connection string: --------------------- use DBI; use DBD::ODBC; use DBI qw(:sql_types); use strict; use warnings; my $db = "something"; my $user = 'XXX'; my $passwd = 'XXX'; my $dbh = DBI->connect('dbi:Oracle:XXX', $user,$passwd, {RaiseError => 1, AutoCommit => 0}) or die $DBI::errstr; ################# This gives the foll...

Howto Install a Perl Wrapper Module for a C Library Locally
Hi, I am attempting to install a CPAN module: Tree::Suffix, in my local home directory. Since I don't have SU previlege. First of all I have installed the required libstree library (http://www.cl.cam.ac.uk/~cpk25/libstree/) in my particular home directory, namely $HOME/MyBioTool/libstree-0.4.2. I have also set the environment like the following in my .bash_profile, so that the module can call it. The bash_profile looks like this: __BEGIN__ # .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # My path to the C library program export CFLA...

Problem with linking C shared library into C++ shared library
Hello! A Corba Components server uses Components as shared libraries that are loaded into the server at runtime. Everything is C++ but I wrote a component which uses libmpeg2 for video decoding and displaying. I use "extern C" to use the mpeg2 C code inside the C++ component. The component shared library compiles and links ok, but when I try to load it into the server I get a "cannot load shared library; undefined symbol" error, for all symbols from libmpeg2. The mpeg2 libraries are all linked and it should work: I tried a simple executable with mpeg2, the c...

google trends on java,c#,perl,c++,c
http://google.com/trends?q=java%2Cc%23%2Cperl%2Cc%2B%2B%2Cc&ctab=0&date=all&geo=all Java and C show big. Perl, C++, C# show small. Opalinski opalpa@gmail.com http://www.geocities.com/opalpaweb/ ...

Linking a C Library
Hi All I need to do some xml canonicalization and the "c routines" are open source provided by Xmlsoft.org in a library libxml2.lib. How do I link in the library? Do I need to re-compile the source etc.? If I just add them to the mak file I get this error. Error: 'C:\DEVELOP\SADLINK\LIBXML2.LIB' contains invalid OMF record, type 0x21 (possibly COFF) Any assistance on how I can do this? TIA David ...

perl bindings for C++ library, linux
hi what are the steps to create perl bindings for a C++ library? -- Qx RSS Reader 1.2.6 released RSS Reader for Linux. http://www.gregerhaga.net/qxrssreader.php On 30 Jun 2006, Greger <boss@gregerhaga.net> wrote: > what are the steps to create perl bindings for a C++ library? Believe me, you don't want to know the exact steps! ;-) You can *generate* the bindings with SWIG, www.swig.org. Dave -- D.a.v.i.d T.i.k.t.i.n t.i.k.t.i.n [at] a.d.v.a.n.c.e.d.r.e.l.a.y [dot] c.o.m Greger wrote: > hi > what are the steps to create perl bindings for a C++ library? never mind,...

build_dir/perl uses /usr/lib/perl !?
I'm doing a re-installation of Perl 5.8.2-2, because the currently installed version has threads enabled, which I don't want. When I do make test, 2 tests fail. Not surprisingly, these tests also fail when I run them individually using: bash-2.05b$ LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd t; ./perl harness <test_file> The first failing test (run/fresh_perl.t) fails with the error: /home/knight/build/perl-5.8.2/perl: relocation error: /usr/lib/perl/5.8.2/auto/NDBM_File/NDBM_File.so: undefined symbol: Perl_Gthr_key_pt which suggests that the perl...

Linking a C Library
Hi All I need to do some xml canonicalization and the "c routines" are open source provided by Xmlsoft.org in a library libxml2.lib. How do I link in the library? Do I need to re-compile the source etc.? If I just add them to the mak file I get this error. Error: 'C:\DEVELOP\SADLINK\LIBXML2.LIB' contains invalid OMF record, type 0x21 (possibly COFF) Any assistance on how I can do this? TIA David David If you use Borland as a C compiler, you need obtain the libxml2.lib from libxml2.dll using implib.exe command: implib libxlm2.lib libxlm2.dll Walter Negro David Williams wrote: > Hi All > > I need to do some xml canonicalization and the "c routines" are open source > provided by Xmlsoft.org in a library libxml2.lib. > > How do I link in the library? > Do I need to re-compile the source etc.? > > If I just add them to the mak file I get this error. > > Error: 'C:\DEVELOP\SADLINK\LIBXML2.LIB' contains invalid OMF record, type > 0x21 (possibly COFF) > > Any assistance on how I can do this? > > TIA > David > > ...

perl sub and perl modules
Hi all, I am new in perl and I am having some difficulties in getting used to it. I have an array of array: my @hap = ( [qw/ a c g t g c/], [qw/ c g ? t a g/], [qw/ a c t t ? c/]); and as during the process I will need to print how this evolves during the process, I tried to place a print sub: sub MyPrint { my (@arr) =@_; for my $i (0..$#arr){ for my $j (0..$#{$arr[$i]}){ print $arr[$i][$j]."\t"; } print "\n"; } } if I call my print as reference: MyPrint(\@hap); I get: ARRAY(0x541c) ARRAY(0x7b944) ...

Re: Calling R, C, C++, C#, Java, Python, Perl, #2
Alan, I found it much easier to process un-structured data in Perl then feed the cleaned, summarized data to SAS. You get the best of both languages when you proceed as suggested, and it takes considerably less time to finish the project. Now, I know a few very good SAS programmers who know all the substleties of string parsing in SAS and can do with SAS what I do with Perl, as easily. But I'm not one of them. Vincent PS: one of my colleagues believe that un-structured data is a thing of the past. In a few years, all data (even messages posted on usenet) will be structured. At 07:28 PM 8/25/2008, Alan Churchill wrote: >Vincent, > >Let's look at the process. > >SAS produces a dataset after a lot of processing. You don't need a 3rd party >calling a 3rd to do something. > >Read a SAS dataset directly using the FREE SAS OleDb driver. Once it is in >memory, manipulate to your heart's content and then write it back out to the >source you need it to go in. > >Pluses? > >Minimal steps reduce the surface area. > >Alan > >Alan Churchill >Savian >www.savian.net > > >-----Original Message----- >From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Vincent >Granville >Sent: Monday, August 25, 2008 8:03 PM >To: SAS-L@LISTSERV.UGA.EDU >Subject: Calling R, C, C++, C#, Java, Python, Perl, etc. from a SAS program > >What about a Perl script calling SAS, R, C++, C# etc. ...

Linking a C++ library to a C program.
Hi, I am writing a C program which interfaces with a C++ library. The C++ library works fine with C. I was wondering if I need to use a C++ compiler (g++ in my case) to compile the C program or can I use a C compiler (gcc). Thanks. On 8 Jul 2005 15:57:50 -0700, "a2x" <add_aaron_2_x@hotmail.com> wrote in comp.lang.c: > Hi, > > I am writing a C program which interfaces with a C++ library. The C++ > library works fine with C. I was wondering if I need to use a C++ > compiler (g++ in my case) to compile the C program or can I use a C > compiler (gcc). > ...

C++/C-library linking (pslib)
Hi, as far as I know I can link all C libraries in C++ as well. but I can't get it done with pslib. pslib is a library to create Postscript documents. The exactly same code compiles and links with C and it doesn't when I use C++. This is my linking command: gcc -o test -L/usr/lib/ -lps -lstdc++ test.cpp and in /usr/lib is definitely the file /usr/lib/libps.so -> libps.so.0.2.4 it all works fine when I compile my file as test.c as C code. but with test.cpp I get these errors: /tmp/ccSuItDe.o(.text+0x11): In function `main': : undefined reference to `PS_boot()' /tmp/ccSuItDe.o(.text+0x16): In function `main': : undefined reference to `PS_new()' [bla bla bla and so on......................] collect2: ld returned 1 exit status this is the stupid little piece of code I wrote after the bigger project didn't compile: #include <libps/pslib.h> main(int argc, char *argv[]) { PSDoc* sheet; PS_boot(); sheet = PS_new(); PS_open_file(sheet,"test.ps"); PS_set_info(sheet,"Title","HelloWorld"); PS_begin_page(sheet,841.9,595.3); PS_end_page(sheet); PS_shutdown(); }; what do I do wrong. BTW, I have debian [sid] running. desperately asking Thomas Ruschival Thomas Ruschival wrote: > Hi, > as far as I know I can link all C libraries in C++ as well. but I can't > get it done with pslib. pslib is a library to create Postscript > docume...

C, C++ and Perl Workshops with NYLXS
While we have some summer off time I'm going to lead 3 workshops for beginners through the NYLXS Mailing List at hangout@nylxs.com We will be doing Introduction to C Programming using the book C Programming: A Modren Approach by K.N.King I'll be developing C programming notes on line as we go. This book is fairly intensive Also we will do Perl Porgramming using the Perl Programming Notes of NYLXS on http://www.nylxs.com/docs/perlcourse/ I'll be reediting these notes as we go, but they are fairly complete as they are Finally, we will be learning C++ with the text C++ Prim...

Books on C/C++ for perl programmers
There are many books on "perl for C/C++ programmers" but none for "C/C+ + for perl programmers". Does anyone know of any such book or tutorial? Thanks in advance, >Hanna< On Apr 28, 4:27=A0am, l0cl <taurusgemini...@gmail.com> wrote: > + for perl programmers". Does anyone know of any such book or > tutorial? I don't think that they are any, but that's not a problem. There are many, many books on C and C++, and we each have our favorites. I can vouch personally for a dozen or so, but I won't. Most of them will probably get you into C or...

Linking a C++ library to a C program.
Hi, I am writing a C program which interfaces with a C++ library. The C++ library works fine with C. I was wondering if I need to use a C++ compiler (g++ in my case) to compile the C program or can I use a C compiler (gcc)? Thanks. p.s. I understand all the extern "C" business. This is purely a do I need to use a C++ compiler to compile a C program that uses a C++ library question. add_aaron_2_x@hotmail.com wrote: > Hi, > > I am writing a C program which interfaces with a C++ library. The C++ > library works fine with C. I was wondering if I need to use a C++ > ...

C, C++ and Perl Workshops by NYLXS
While we have some summer off time I'm going to lead 3 workshops for beginners through the NYLXS Mailing List at hangout@nylxs.com We will be doing Introduction to C Programming using the book C Programming: A Modren Approach by K.N.King I'll be developing C programming notes on line as we go. This book is fairly intensive Also we will do Perl Porgramming using the Perl Programming Notes of NYLXS on http://www.nylxs.com/docs/perlcourse/ I'll be reediting these notes as we go, but they are fairly complete as they are Finally, we will be learning C++ with ...

Calling R, C, C++, C#, Java, Python, Perl, etc. from a SAS program
What about a Perl script calling SAS, R, C++, C# etc. rather than SAS calling these languages? Wouldn't it be easier? What are the pluses / minuses? I'm used to write Perl scripts to pre-process messy data (text mining) and produce summary tables, then feed the clean summary tables to SAS. What do SAS engineers think about this strategy? Feel free to reply on http://www.analyticbridge.com/group/sasandstatisticalprogramming Unstructured data will always be with us since people communicate in an unstructured way. Will the unstructured section be held within a structured framework? Sure, I can see that. Alan Alan Churchill Savian www.savian.net -----Original Message----- From: Vincent Granville [mailto:vincentg@datashaping.com] Sent: Monday, September 01, 2008 11:19 AM To: Alan Churchill; SAS-L@LISTSERV.UGA.EDU Subject: RE: Calling R, C, C++, C#, Java, Python, Perl, etc. from a SAS program Alan, I found it much easier to process un-structured data in Perl then feed the cleaned, summarized data to SAS. You get the best of both languages when you proceed as suggested, and it takes considerably less time to finish the project. Now, I know a few very good SAS programmers who know all the substleties of string parsing in SAS and can do with SAS what I do with Perl, as easily. But I'm not one of them. Vincent PS: one of my colleagues believe that un-structured data is a thing of the past. In a few years, all data (even messages posted on usenet) will be structu...

Calling R, C, C++, C#, Java, Python, Perl, etc. from a SAS program #2
What about a Perl script calling SAS, R, C++, C# etc. rather than SAS calling these languages? Wouldn't it be easier? What are the pluses / minuses? I'm used to write Perl scripts to pre-process messy data (text mining) and produce summary tables, then feed the clean summary tables to SAS. What do SAS engineers think about this strategy? Anybody has thoughts on this? Feel free to reply on http://www.analyticbridge.com/group/sasandstatisticalprogramming Vincent, Let's look at the process. SAS produces a dataset after a lot of processing. You don't need a 3rd party calling a 3rd to do something. Read a SAS dataset directly using the FREE SAS OleDb driver. Once it is in memory, manipulate to your heart's content and then write it back out to the source you need it to go in. Pluses? Minimal steps reduce the surface area. Alan Alan Churchill Savian www.savian.net -----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Vincent Granville Sent: Monday, August 25, 2008 8:03 PM To: SAS-L@LISTSERV.UGA.EDU Subject: Calling R, C, C++, C#, Java, Python, Perl, etc. from a SAS program What about a Perl script calling SAS, R, C++, C# etc. rather than SAS calling these languages? Wouldn't it be easier? What are the pluses / minuses? I'm used to write Perl scripts to pre-process messy data (text mining) and produce summary tables, then feed the clean summary tables to SAS. What do SAS engineers think about this st...

Embedding Perl in C/C++: help needed!
I am a veteran Perl user, but a newbie embedder. I am trying to figure out the best way to solve a problem I have. Please read along--any advice is appreciated. TASK: I am talking to a networked camera via HTTP, and the URLs I need to send and the requests I get back are a variety of fairly complicated and not always consistent text strings. THE GOAL: I need to interface with the camera from a C/C++ program. APPROACH: the camera came with a hard-copy manual that spelled out all the camera params and commands, syntax, etc. I slapped all the info into a config file in my own white-space-delimited column format that is pretty simple to read and understand. As far as parsing goes, I figure there are 4 general approaches I could have taken: 1. Hack something together using sscanf, strtok, and their ilk, and not have it robust, but get it working quickly. NOT AN OPTION. 2. Do it "right" in C using lex/yacc, bison/flex, etc. I have done parsers in this manner, but generally takes longer than using a Perl approach, and you have to debug the grammar corner cases, etc. 3. Embed Perl into the C program and use Perl for all the text munging. Has the added advantage of being flexible, not having to recompile when config file changes, yada. 4. Do the config file in standardized text format like XML, and it may not be too readable to humans, but I am sure there are some free libraries that will parse it easily and hand me my data in C nicely. COMMENTS WELC...

C, C++ and Perl Programming Workshops from NYLXS
While we have some summer off time I'm going to lead 3 workshops for beginners through the NYLXS Mailing List at hangout@nylxs.com We will be doing Introduction to C Programming using the book C Programming: A Modren Approach by K.N.King I'll be developing C programming notes on line as we go. This book is fairly intensive Also we will do Perl Porgramming using the Perl Programming Notes of NYLXS on http://www.nylxs.com/docs/perlcourse/ I'll be reediting these notes as we go, but they are fairly complete as they are Finally, we will be learning C++ with the text C++ Prime...

C/C++, Perl, etc. to Python converter
Is there a Perl to Python converter? Or in general: a XY to Python converter? Is see, that Python is much better then Perl anyway. But for beginners, they whant to konw how is this done with Python etc. Sure, there are some docus out there in the internet. But a converter? mm wrote: > > Is there a Perl to Python converter? > Or in general: a XY to Python converter? > > Is see, that Python is much better then Perl anyway. > But for beginners, they whant to konw how is this done with Python etc. > > Sure, there are some docus out there in the internet. But a conve...

Access a c++ module from Perl
I am using cygwin and perl and trying to access some function from a C++ windows dll. After the first attempt produced a segmentation fault, I tried to do it step-by-step. I created a dummy function in the dll file: int TestDLL(int x) { return 1; } and put the following code in a perl file: use strict; use Win32::API::Prototype; my $TestDLL = ApiLink("mydll",'I TestDLL(I x)'); if (not defined $TestDLL) { die "Can't import API TestDLL: $! \n"; } print "ApiLink done\n"; my $xx = 0; my $return = $TestDLL->Call($xx); print $return."\n&q...

compile Perl as a STATIC library
Hi, i downloaded, compiled and installed Perl successfully on Win32. I can now write programs that use the Perl interpreter to execute some scripts. That's just fine. But if i want to distribute this code to some other PCs, i need to install Perl there completely, not just the perl58.dll, but also the modules. Is there some way to compile Perl as a STATIC library that already includes all modules that come with a normal Perl installation? I looked into the Makefile, the Readme's, but didn't yet find any hint for this. I hope it is clear what i want, i want to compile a static...

Web resources about - Perl MakeMaker - how to force Perl linking with the static C library (libcrt.lib) instead of dynamic C library (msvcrt.lib) - comp.lang.perl.modules

Hottest 'configuration-files' Answers - Stack Overflow
current community chat blog Stack Overflow Meta Stack Overflow Stack Overflow Careers your communities Sign up or log in to customize your list. ...

CPAN - Wikipedia, the free encyclopedia
Like many programming languages , Perl has mechanisms to use external libraries of code, making one file contain common routines used by several ...


apache/trafficserver · GitHub
trafficserver - Mirror of Apache Traffic Server

Still More Perl Lightning Articles
It has been common practice within the Perl community for ages to ship distributions with a Makefile.PL so that the user will be able to install ...

Perlbuzz
What's happening in the world of Perl programming, including Perl 5, Perl 6, the CPAN and Parrot? news roundup for 2013-07-15 By Andy Lester ...

Chronological `perl5-porters' 2008-01 (14/15) Mailing List Archive
[ First Page ][ Prev Page ][ Next Page ][ Last Page ] [ Thread Index ][ Top&Search] [ Archives ] Re: Change 33039 - VMS followup needed. From ...

[Linux] 建置 Perl 5.10.0 及 BugZilla 3.0.5 測試環境 @ Ubuntu 14.04
最近接收公司的 Mail Server,其中有一台 Server 在跑 Bugzilla 3.0.5 版本以及跑在 Perl 5.10.0 的環境,然而新的 Mail server 限制外寄走 SMTP + AUTH + SSL 的方式,這時就踩到 Bugzilla 3.0.5 不支援 ...

Marc Lehmann / Coro - search.cpan.org
Home · Authors · Recent · News · Mirrors · FAQ · Feedback in All Modules Distributions Authors permalink Marc Lehmann > Coro Coro This Release ...

debian-devel Apr 2014 by thread
debian-devel Apr 2014 by thread [ previous month ] [ first page ] [ previous page ] Page 2 of 2 "> [next page] - "> [ last page ] [ next month ...

Resources last updated: 3/24/2016 7:39:36 AM