From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19178 invoked by alias); 20 Jul 2004 23:22:10 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 19168 invoked from network); 20 Jul 2004 23:22:09 -0000 Received: from unknown (HELO ns1.u-strasbg.fr) (130.79.200.1) by sourceware.org with SMTP; 20 Jul 2004 23:22:09 -0000 Received: from math.u-strasbg.fr (math.u-strasbg.fr [130.79.4.9]) by ns1.u-strasbg.fr (8.12.9p2/jtpda-5.4) with ESMTP id i6KNLwvY037953 ; Wed, 21 Jul 2004 01:21:58 +0200 (CEST) Received: from irmasrv2 (irmasrv2 [130.79.4.9]) by math.u-strasbg.fr (8.11.6+Sun/8.10.2) with ESMTP id i6KNLvT29539; Wed, 21 Jul 2004 01:21:58 +0200 (MEST) Date: Tue, 20 Jul 2004 23:22:00 -0000 From: Vincent Torri X-Sender: torri@irmasrv2 To: Eljay Love-Jensen cc: gcc-help@gcc.gnu.org Subject: Re: relocation error In-Reply-To: <6.1.1.1.2.20040719073842.020572b0@iplan-mn.corp.adobe.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-1.5.3 (ns1.u-strasbg.fr [130.79.200.1]); Wed, 21 Jul 2004 01:21:58 +0200 (CEST) X-Antivirus: scanned by sophos at u-strasbg.fr X-SW-Source: 2004-07/txt/msg00199.txt.bz2 i have indeed found that the problem comes from a library that is use. I create a very small class : in toto.h : class Toto { int x; public: Toto(int i); }; in toto.cpp : #include "toto.h" Toto::Toto(int i) { x = i; } in test.cpp : #include "../src/toto.h" int main () { Toto tt(2); return 0; } i link toto.cpp in my_lib.so i compile test.cpp with : g++ bin/libavisynth.so -L/home/torri/local/lib -lstlport_gcc -L/home/torri/local/lib -lboost_thread-gcc-mt-1_31 -Wall -O2 -o bin/test ../../test/test.cpp when i exec ./bin/test, i have: ./bin/test: relocation error: ./bin/test: undefined symbol: _ZN4TotoC1Ei There's no problem if i link directly with toto.so and not my_lib.so There's no problem if there's no parameters in the constructor all the libs have been compiled with the same compiler (g++ 3.3.1) nm ./bin/my_lib.so |grep _ZN4TotoC1Ei returns 001e8950 T _ZN4TotoC1Ei afaik, gdb or valgrind have not helped me much. i'm completely lost. Why this small class could not be used ? Vincent TORRI On Mon, 19 Jul 2004, Eljay Love-Jensen wrote: > Hi Vincent, > > It appears that this is not defined at link time: > avs::text::Font::Font(_STL::basic_string, > _STL::allocator > const&, int) > > Check your build process to make sure the source file which contains that > routine is defined, and included in the compile, and being linked in. > > HTH, > --Eljay > >