delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/05/08/11:35:05

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Message-ID: <33060572.957803684654.JavaMail.imail@chilly.excite.com>
Date: Mon, 8 May 2000 09:34:44 -0700 (PDT)
From: Sonny Harper <sonny421 AT excite DOT com>
To: cygwin AT sourceware DOT cygnus DOT com
Subject: repost
Mime-Version: 1.0
X-Mailer: Excite Inbox
X-Sender-Ip: 63.197.4.216

Hi, 
I've posted this message previously with no response.  Is this a legitimate
question (I'm kinda new at this)? 

I am trying to compile the example to build a relocatable DLL from the
http://sourceware.cygnus.com/cygwin/building-reloc-dlls.txt.  However, I am
using g++ instead of gcc, and I've converted foo2.c to a C++ class foo2.cc.
However, the reference to new in foo.c 
 foo2 f2 = new foo2(); 
is not resolvable and produces the following link error. 
ld -L
c:/cygnus/cygwin-b20/H-i586-cygwin32/lib/gcc-lib/i586-cygwin32/egcs-2.91.57
-lgcc -lstdc++ --base-file fooB.base --dll -o fooB.dll foo.o foo2.o init.o
fixup.o c:/cygnus/cygwin-b20/H-i586-cygwin32/i586-cygwin32/lib/libcygwin.a
-e _dll_entry AT 12 
foo.o(.text+0x25):foo.cc: undefined reference to `__builtin_new' 

I've tried moving the call to 'new foo2()' directly to the foo2.cc file,
with no help (I thought maybe you just couldn't call 'new' from a method
declared 'extern C'). 
Also, foo.o is not even generated from a file called foo.cc 
(the file is actually foo.c).  I suppose maybe g++ assumes the source file
to have a .cc extension, I'm not sure. 
Any advice greatly appreciated. 

Thanks! 
-Sonny 

















_______________________________________________________
Get 100% FREE Internet Access powered by Excite
Visit http://freelane.excite.com/freeisp


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019