Patrick,
make sure you have lines like this in your TGListViewn.cxx file:
FontStruct_t TGLVEntryn::fgDefaultFontStruct;
For examples look in GUI_GClient.cxx.
In the ctor of your class put something like:
{
Bool_t init = kFALSE;
if (!init) {
// use same settings as original
fgDefaultFontStruct = TGLVEntry::fgDefaultFontStruct;
...
init = kTRUE;
}
...
}
-- Fons
On Tue, Apr 11, 2000 at 05:02:29PM +0200, Patrick Dupre LCMI wrote:
> Hello,
>
> I first generated a histaction.cc file from guidemo. And I compiled,
> every thing run fine.
> Then, I made a copy of TGListView.h, TGListView.cxx, TGFileContainer.cxx and
> of TGFileContainer.h. I modify le name of all the classes to avoid
> confusion, than I recompile. The compilation is OK, but the linker
> gives me the following error (include my new classes):
> `TGLVEntryn::fgDefaultGC'
> TGListViewn.o(.text+0x224): undefined reference to `TGLVEntryn::fgDefaultFontStruct'
> TGListViewn.o: In function `TGLVEntryn::DoRedraw(void)':
> TGListViewn.o(.text+0x819): undefined reference to `TGLVEntryn::fgSelPixel'
> ...................
>
> The proleme comes from the static variables (fg....).
>
> What shoudl I do ? PLEASE; Is there an option of compilation with is wrong ?
> Thank.
>
> --
> ---
> ==============================================================================
> Patrick DUPRE | | Tel: (33 4) 76-88-78-51
> CNRS/LCMI (GHMFL) | | Fax: (33 4) 76-85-56-10
> 25 Rue des Martyrs, BP 166 | | http://eschyle.polycnrs-gre.fr
> F-38042 GRENOBLE Cedex 09 | | email: pdupre@polycnrs-gre.fr
> ==============================================================================
--
Org: CERN, European Laboratory for Particle Physics.
Mail: 1211 Geneve 23, Switzerland
E-Mail: Fons.Rademakers@cern.ch Phone: +41 22 7679248
WWW: http://root.cern.ch/~rdm/ Fax: +41 22 7677910
This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:23 MET