public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* undefined reference to `__builtin_new'
@ 2000-05-04 15:01 Sonny Harper
  0 siblings, 0 replies; only message in thread
From: Sonny Harper @ 2000-05-04 15:01 UTC (permalink / raw)
  To: cygwin

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++ -lgcc --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@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').
A strange note here, 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@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-05-04 15:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-05-04 15:01 undefined reference to `__builtin_new' Sonny Harper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).