From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Martin v. Loewis" To: carlo@runaway.xs4all.nl Cc: egcs@cygnus.com Subject: Re: #pragma interface && generating virtual tables (of templates?) Date: Sun, 28 Feb 1999 22:53:00 -0000 Message-ID: <199902201932.UAA03305@mira.isdn.cs.tu-berlin.de> References: <199902201741.SAA11876@jolan.ppro> X-SW-Source: 1999-02n/msg00966.html Message-ID: <19990228225300.9a3O1gphnuFotrLPR3Yhn4f4r8Kk1OTYh6GvsmTTUI8@z> > /home/carlo/c++/egcs.bugs/bug3/ircd.lag.cc:34: undefined reference to `server_sock_dct virtual table' [...] > Am I correct to think that this would be a bug, because > templates should not be influenced by '#pragma interface' > at all (since they don't generate code by themselfs to > begin with)? I'd agree this is a bug, at least on the information you provided. Of course, providing a full bug support (i.e. including preprocessor output of ircd.lag.ii) shouldn't be that difficult, unless you've copyright problems. The virtual table for server_sock_dct should get emitted into ircd.lag.o. As a work-around, you can probably force this by implementing get_output_stream out-of-line. > I understand this is all pretty vague :(, because I can't provide > a working example - but perhaps someone can give me a clue on > whether or not using #pragma interface is deprecated in this case > and/or if I can organize things differently so I won't get undefined > virtual tables all the time :) I'd say #pragma interface is deprecated, period. If you count the trouble you had with it, don't you agree that it wasn't worth it? With the new weak and link-once symbols on Linux-ELF, there is hardly any use for it anymore. Regards, Martin