Mail Archives: cygwin/2000/05/08/11:35:05
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 -