[Kde-bindings] [Bug 75310] New: kdebindings: qtjava compile error: undefined reference to `operator!=(QGLFormat const&, QGLFormat const&)'

Richard Dale Richard_Dale at tipitina.demon.co.uk
Sun Feb 15 21:51:58 UTC 2004


Strange it looks like the two functions were defined in the header, but the 
implementations were missing for some reason.

I have this in qgl.h:

...
    friend QM_EXPORT_OPENGL bool operator==( const QGLFormat&,
					     const QGLFormat& );
    friend QM_EXPORT_OPENGL bool operator!=( const QGLFormat&,
					     const QGLFormat& );
private:
    uint opts;
    int pln;
};


QM_EXPORT_OPENGL bool operator==( const QGLFormat&, const QGLFormat& );
QM_EXPORT_OPENGL bool operator!=( const QGLFormat&, const QGLFormat& );

And this is the implemetation in qgl.cpp:

/*!
    Returns TRUE if all the options of the two QGLFormats are equal;
    otherwise returns FALSE.
*/

bool operator==( const QGLFormat& a, const QGLFormat& b )
{
    return (a.opts == b.opts) && (a.pln == b.pln);
}


/*!
    Returns FALSE if all the options of the two QGLFormats are equal;
    otherwise returns TRUE.
*/

bool operator!=( const QGLFormat& a, const QGLFormat& b )
{
    return !( a == b );
}

The code isn't surrounded by #ifdefs, so I can't see why it should go wrong. 
Have you got these two functions in your copy of qgl.cpp?

-- Richard

On Sunday 15 February 2004 20:37, info at elmar-baumann.de wrote:
> ------- You are receiving this mail because: -------
> You are the assignee for the bug, or are watching the assignee.
>
> http://bugs.kde.org/show_bug.cgi?id=75310
>            Summary: kdebindings: qtjava compile error: undefined reference
>                     to `operator!=(QGLFormat const&, QGLFormat const&)'
>            Product: bindings
>            Version: unspecified
>           Platform: Compiled Sources
>         OS/Version: Linux
>             Status: UNCONFIRMED
>           Severity: normal
>           Priority: NOR
>          Component: general
>         AssignedTo: kde-bindings mail kde org
>         ReportedBy: info elmar-baumann de
>
>
> Version:           3.1.95 (3.2-rc1) (using KDE KDE 3.2.0)
> Installed from:    Compiled From Sources
> Compiler:          gcc 3.2 (g++)
> OS:          Linux
>
> I did compile KDE 3.1.95 (3.2 Release Candidate 1) with konstruct-20040119.
> All packages in the kde subdirectories and the applications KDevelop and
> Quanta compiled without problems. Only the kdebindings compiled with an
> error in the 'qtjava' directory: The operator==() for two QGLFormat objects
> could not be resolved. QT Version: 3.3.0 (But kde was compiled without
> defined HAVE_QT_3_2_INSTALLED in "gar.conf.mk", because of compile errors
> in another package). gcc (g++) version: 3.2. linux version: 2.4.21.
> compiler output:
>
> make[5]: Leaving directory
> `/root/tmp/konstruct/kde/kdebindings/work/kdebindings-3.1.95/qtjava/javalib
>/docs' Making all in qtjava
> make[5]: Entering directory
> `/root/tmp/konstruct/kde/kdebindings/work/kdebindings-3.1.95/qtjava/javalib
>/qtjava' /bin/sh ../../../libtool --silent --mode=link --tag=CXX g++ 
> -Wnon-virtual-dtor -Wno-long-long -Wundef -Wall -W -Wpointer-arith
> -Wwrite-strings -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align
> -Wconversion -Wchar-subscripts -O2 -I/usr/opt/kde3.2-rc/include
> -I/usr/X11R6/include -L/usr/opt/kde3.2-rc/lib -L/usr/X11R6/lib -O2 -pipe
> -Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new
> -fno-common    -o libqtjava.la -rpath /usr/opt/kde3.2-rc/lib
> -L/usr/X11R6/lib -L/usr/opt/kde3.2-rc/lib  -no-undefined -Wl,--no-undefined
> -Wl,--allow-shlib-undefined -version-info 1:0:0 libqtjava_la.all_cpp.lo 
> -lqt-mt  -lz -lpng -lz -lm -lXext -lX11  -lSM -lICE -lpthread
> .libs/libqtjava_la.all_cpp.o: In function
> `Java_org_kde_qt_Qt_op_1equals__Lorg_kde_qt_QGLFormat_2Lorg_kde_qt_QGLForma
>t_2': .libs/libqtjava_la.all_cpp.o(.text+0x41836): undefined reference to
> `operator==(QGLFormat const&, QGLFormat const&)'
> .libs/libqtjava_la.all_cpp.o: In function
> `Java_org_kde_qt_Qt_op_1not_1equals__Lorg_kde_qt_QGLFormat_2Lorg_kde_qt_QGL
>Format_2': .libs/libqtjava_la.all_cpp.o(.text+0x41f76): undefined reference
> to `operator!=(QGLFormat const&, QGLFormat const&)' collect2: ld returned 1
> exit status
> make[5]: *** [libqtjava.la] Error 1
> make[5]: Leaving directory
> `/root/tmp/konstruct/kde/kdebindings/work/kdebindings-3.1.95/qtjava/javalib
>/qtjava' make[4]: *** [all-recursive] Error 1
> make[4]: Leaving directory
> `/root/tmp/konstruct/kde/kdebindings/work/kdebindings-3.1.95/qtjava/javalib
>' make[3]: *** [all-recursive] Error 1
> make[3]: Leaving directory
> `/root/tmp/konstruct/kde/kdebindings/work/kdebindings-3.1.95/qtjava'
> make[2]: *** [all-recursive] Error 1
> make[2]: Leaving directory
> `/root/tmp/konstruct/kde/kdebindings/work/kdebindings-3.1.95' make[1]: ***
> [all] Error 2
> make[1]: Leaving directory
> `/root/tmp/konstruct/kde/kdebindings/work/kdebindings-3.1.95' make: ***
> [build-work/kdebindings-3.1.95/Makefile] Error 2
> _______________________________________________
> Kde-bindings mailing list
> Kde-bindings at kde.org
> https://mail.kde.org/mailman/listinfo/kde-bindings



More information about the Kde-bindings mailing list