Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-Id: <4.3.1.2.20010213130730.019bf420@pop.ma.ultranet.com> X-Sender: lhall AT pop DOT ma DOT ultranet DOT com X-Mailer: QUALCOMM Windows Eudora Version 4.3.1 Date: Tue, 13 Feb 2001 13:09:17 -0500 To: Josifovski Ljubomir-BLJ01Z , "Cygwin Mailing List (E-mail)" From: "Larry Hall (RFK Partners, Inc)" Subject: RE: QT Cc: "'l DOT josifovski AT dcs DOT shef DOT ac DOT uk'" , "'j DOT barker AT dcs DOT shef DOT ac DOT uk'" In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" 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 AT 0' > >I see that libqtai needs: > >$ nm /usr/local/qtai/lib/libqtai.a|grep glPushMatrix > U _glPushMatrix AT 0 > >(also > >$ nm /usr/local/qtai/aiplot3d.o |grep glPushMatrix > U _glPushMatrix AT 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 AT 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 AT rfk DOT 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