From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Larry Hall (RFK Partners, Inc)" To: Josifovski Ljubomir-BLJ01Z , "Cygwin Mailing List (E-mail)" Cc: "'l.josifovski@dcs.shef.ac.uk'" , "'j.barker@dcs.shef.ac.uk'" Subject: RE: QT Date: Tue, 13 Feb 2001 10:13:00 -0000 Message-id: <4.3.1.2.20010213130730.019bf420@pop.ma.ultranet.com> References: X-SW-Source: 2001-02/msg00667.html At 12:45 PM 2/13/2001, Josifovski Ljubomir-BLJ01Z wrote: >Not directly related to QT, but maybe someone can help me. > >I'm trying to link an application I need with a library libqtai that uses >libqt and libGL (found in xfree/contrib/sgi-opengl.tar.bz2). When I try to >link my application with the libraries, ex: > >$ g++ -I. -I /home/ljupco/CTK/include/ctk -Wall -O2 -D_HAS_QT >-D_HAS_CURSES -o /home/ljupco/CTK/local/bin/CTKScript >/home/ljupco/CTK/lib/CTKScript.o my_blocks.o my_translation_table.o >-L/home/ljupco/CTK/lib -L/usr/local/qt/lib -L/usr/X11R6/lib -lctk >/usr/local/qtai/lib/libqtai.a -lqt -lm -lcurses -lXmu -lXext -lSM -lICE >-lGLU -lglut -lX11 -lGL > >I get error like: > >/usr/local/qtai/lib/libqtai.a(aiplot3d.o)(.text+0x5a26): undefined reference >to `glPushMatrix@0' > >I see that libqtai needs: > >$ nm /usr/local/qtai/lib/libqtai.a|grep glPushMatrix > U _glPushMatrix@0 > >(also > >$ nm /usr/local/qtai/aiplot3d.o |grep glPushMatrix > U _glPushMatrix@0 >) > >While libGL provides: > >$ nm /usr/X11R6/lib/libGL.a |grep glPushMatrix >00000000 I ___imp_glPushMatrix >00000000 I __imp__glPushMatrix >00000000 T _glPushMatrix > >(also > >$ nm /usr/X11R6/static-lib/libGL.a |grep glPushMatrix >00004ab8 T _glPushMatrix > >) > >Is this the names mangling thingy that c++ ("@parameters-derived-signature") >does versus the way c does it ("_" before the name)? But I see that the > header included from aiplot3d.cpp (and the headers it includes) >have the "#ifdef __cpluplus extern "C" {" stuff. So where does @0 (in "U >_glPushMatrix@0") come from? > >The metacompiler (moc) is used while creating the libqtai creating >moc_aiplot3d.cpp. Can this be the problem? This is an issue with calling conventions. See: http://msdn.microsoft.com/library/devprods/vs6/visualc/vccore/_core___cdecl.htm http://msdn.microsoft.com/library/devprods/vs6/visualc/vccore/_core___stdcall.htm Larry Hall lhall@rfk.com RFK Partners, Inc. http://www.rfk.com 118 Washington Street (508) 893-9779 - RFK Office Holliston, MA 01746 (508) 893-9889 - FAX -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple