Compiling kdevelop - undefined reference to .... problems

Sean Kelly lists at shortestpath.org
Tue Apr 6 13:08:01 CEST 2004


Quoting Ralf Habacker <ralf.habacker at freenet.de>:

> a google search gives me 
> 
http://www.kdevelop.org/3.0/doc/programming_manual/html/classFtnchekConfigWi
dgetBase.html
> 
> and a look into languages/fortran shows, that there there are two files 
> ftnchekconfigwidgetbase.cpp and ftnchekconfigwidgetbase.h, which
> implements 
> this class. At first I assume that the object file 
> nm  .libs/ftnchekconfigwidgetbase.o created from
> ftnchekconfigwidgetbase.cpp 
> is damaged or empty. an nm shows me 
> 
> $ cd languages/fortran
> $ nm  .libs/ftnchekconfigwidgetbase.o | grep 
> FtnchekConfigWidgetBase::FtnchekConfigWidgetBase
> <empty line> 
> 
> Please note the empty output of this tool. It does not print  
> FtnchekConfigWidgetBase::FtnchekConfigWidgetBase as you may expect. 
> 
> The constructors you are missing are coded as 
> 000018d0 T __ZN23FtnchekConfigWidgetBaseC1EP7QWidgetPKcj
>                             <----method name------> <method signature>
> 00000230 T __ZN23FtnchekConfigWidgetBaseC2EP7QWidgetPKcj
>                             <----method name------> <method signature>
> 
> This behavior, coding the c++ method with the parameter list into a some
> sort 
> of cryptic symbols is called name mangling, which all c++ compilers does.
> 
> You can get a more readable output with: 
> 
> $ nm  -C .libs/ftnchekconfigwidgetbase.o | grep 
> FtnchekConfigWidgetBase::FtnchekConfigWidgetBase
> 000018d0 T FtnchekConfigWidgetBase::FtnchekConfigWidgetBase(QWidget*,
> char 
> const*, unsigned)
> 00000230 T FtnchekConfigWidgetBase::FtnchekConfigWidgetBase(QWidget*,
> char 
> const*, unsigned)
> 
> so If you look fot c++ symbols either use only symbol method names or use
> nm -C. 

  Would you happen to know how to fix this problem?  I too can see the 
symbols now with nm -C but I don't know how to make the compiler see the 
required library.

  Thanks,

-- 
Sean Kelly <lists at shortestpath.org>


More information about the kde-cygwin mailing list