undefined reference to `x'

Ingo Krabbe ikrabbe.ask@web.de
Wed Aug 2 21:59:00 GMT 2006


Am Mittwoch, 2. August 2006 18:19 schrieb Alex Triffitt:
> [...]
>
> g++ -g -o iNSpect configFile.o eventBuilder.o vizNodeList.o vizNode.o
> vizLine.o iNSpect.o vizProperties.o simWindow.o toolkitWindow.o
> vizManager.o nodeStats.o -pthread -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0
> -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0
> -lgmodule-2.0 -ldl -lgthread-2.0 -lglib-2.0   -Wl,--export-dynamic
> -lgtkglext-x11-1.0 -lgdkglext-x11-1.0 -lGLU -lGL -lgtk-x11-2.0 -lpangox-1.0
> -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lpango-1.0
> -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0
>
> I get the following error;
>
> vizManager.o: In function
> `~vizManager':/home/triff/inspect-triff-beta/src/vizManager.cpp:99:
> undefined reference to `drawWindow::~drawWindow()'
> [...]

Well, you should examine where the drawWindow class is or should be defined.  
Most usefully it would live in file like drawWindow.cpp which then should 
compile into drawWindow.o and should then be added to the linker line above.

What's about toolkitWindow.o ?  Anyway as I assume from the layout of your 
errors, drawWindow is a locally defined object, which should live somewhere 
near your code.  Or should it be in some library ?

You may just have forgotten object file or libary.  Try to find out which.



More information about the Gcc-help mailing list