This is the mail archive of the cygwin@sourceware.cygnus.com
mailing list for the Cygwin project. See the Cygwin
home page for more information.
[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index] [Subject Index] [Author Index] [Thread Index]
B20.1/EGCS1.1.1: undefineds with -frepo
- To: khan@xraylith.wisc.edu (Mumit Khan)
- Subject: B20.1/EGCS1.1.1: undefineds with -frepo
- From: Graham Dumpleton <Graham.Dumpleton@ra.pad.otc.com.au>
- Date: Thu, 18 Feb 1999 16:41:28 +1100 (EST)
- Cc: cygwin@sourceware.cygnus.com
- Delivered-To: listarch-cygwin@sourceware.cygnus.com
- Delivered-To: mailing list cygwin@sourceware.cygnus.com
- In-Reply-To: <Pine.SUN.3.93.990216222406.25483G-100000@modi.xraylith.wisc.edu> from "Mumit Khan" at Feb 16, 99 10:38:11 pm
- Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
- Sender: cygwin-owner@sourceware.cygnus.com
Am getting many undefined symbols when using -frepo option on EGCS 1.1.1 to
handle templates. The package I am trying to build is OSE.
I have also been having trouble using -frepo with Cygnus GNUPro C++ 98r2 on
Solaris as well. When I got a small test program together to show the
problem in Cygnus GNUPro, I found it also showed a problem in EGCS 1.1.1
although the set of undefined symbols was actually quite different which
was quite amusing. The good thing was I could send the same test program to
this mailing list and Cygnus which saved me a bit of work, although I think
this may only be the start of the problems I find. :-(
The test program is:
template<class T>
class ONE
{
public:
virtual ~ONE();
};
template<class T>
ONE<T>::~ONE() { }
template<class T>
class TWO
{
public:
TWO();
};
template<class T>
TWO<T>::TWO()
{
new ONE<T>;
}
main(int argc, char* argv[])
{
TWO<int> obj;
return 0;
}
When put in a file called bug.cc and with the commands:
g++ -frepo -c bug.cc
g++ bug.o
it generates:
bug.o(.text+0x10):bug.cc: undefined reference to `TWO<int>::TWO(void)'
collect2: ld returned 1 exit status
Adding -frepo to the final link line makes no difference.
On Cygnus GNUPro C++ 98r1 this test program works fine, although it has
problems on Cygnus GNUPro C++ 98r2.
I have actually gone back now and managed to build OSE fine using -frepo
with Cygnus GNUPro C++ 98r1, so it isn't the way I am doing things.
--
Graham Dumpleton (grahamd@nms.otc.com.au)
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com