www.delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Date: | Mon, 4 Nov 2002 07:26:33 +0100 |
From: | "Gerrit P. Haase" <gp AT familiehaase DOT de> |
Organization: | Esse keine toten Tiere |
X-Priority: | 3 (Normal) |
Message-ID: | <981554689825.20021104072633@familiehaase.de> |
To: | Eric Benson <eric_a_benson AT yahoo DOT com> |
CC: | perl-xs AT perl DOT org, cygwin AT cygwin DOT com |
Subject: | Re: Problems with Perl XS module in C++ on Cygwin |
In-Reply-To: | <20021001190659.86230.qmail@web10101.mail.yahoo.com> |
References: | <20021001190659 DOT 86230 DOT qmail AT web10101 DOT mail DOT yahoo DOT com> |
MIME-Version: | 1.0 |
X-Sender: | 320081107336-0001 AT t-dialin DOT net |
Hallo Eric, Am Dienstag, 1. Oktober 2002 um 20:06 schriebst du: > I'm having trouble building a Perl XS module in C++ on > Cygwin. I've got Cygwin 1.3.12-2 and I've tried Perl > 5.6.1 and Perl 5.8.0. This module has built and run > successfully on Linux. I used the XS C++ guidelines in > http://www.johnkeiser.com/perl-xs-c++.html > The first problem is caused by the macro definition of > vform in perl.h. This causes > /usr/include/g++-3/streambuf.h:405: parse error before > `const' > when a C++ declaration for vform is encountered. I > worked around this by adding > #undef vform > after the Perl includes. Since none of my code uses > vform I believe this is safe, but there is probably a > better solution to this problem. > The second problem shows up when linking the shared > object. I get the following error: > /usr/lib/libcygwin.a(libcmain.o)(.text+0x81): > undefined reference to `WinMain AT 16' > This error doesn't occur when building a C-based Perl > XS module, only a C++ based module. > I put a dummy main() definition in my .xs file > #ifdef __CYGWIN__ > int main(int, char**) {} > #endif > which made the shared object link successfully. > Finally, the third and still unsolved problem shows up > when I try to use the module. When Perl loads the > module, I get the following (fatal) error: > Can't find 'boot_CdrDao' symbol in > /usr/lib/perl5/site_perl/5.8.0/cygwin-multi-64int/auto/CdrDao/CdrDao.dll > I haven't dug very far into this, but I believe that > boot_CdrDao is a function that is supposed to be > generated by the XS compiler to initialize the module. > Apparently it gets generated properly for C-based XS > modules but not for C++-based XS modules on Cygwin. I > suspect that the last two problems are really two > different symptoms of the same problem. > I'd appreciate any help at all in solving this from > the Perl-XS or the Cygwin community. Thanks. Sorry for replying that late. Have you tried to build your module with GCC 3 which is now stable and recommended as Compiler. It supports C++ coding much better. Available through the usual Cygwin mirrors with setup.exe. Gerrit -- =^..^= -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |