Re: [Ekiga-devel-list] Build error with pwlib head and gcc-3.4.6



This may be a simple-minded suggestion, but have you tried linking with '-lpt' instead of '-lpt_linux_x86'? That seems to be the way PWLib is linked during the Ekiga compilation process. 

Sorry if this is something you already tried!
Will


-----Original Message-----
From: ekiga-devel-list-bounces gnome org on behalf of Luc Saillard
Sent: Tue 10/2/2007 10:48 AM
To: ekiga-devel-list gnome org
Subject: [Ekiga-devel-list] Build error with pwlib head and gcc-3.4.6
 
Hi,

 I try to build ekiga snapshot (from two days ago) and it failed when linking
a program. Building the pwlib library (and opal) reports no error, but failed on a
simple program like this:

      /* Override any gcc2 internal prototype to avoid an error.  */
      #ifdef __cplusplus
      extern "C"
      #endif
      /* We use char because int might match the return type of a gcc2
         builtin and then its argument prototype would still apply.  */
      char read ();
      int main ()
      {
        read ();
        return 0;
      }


# g++-3.4 t.c -lpt_linux_x86_r -Llib 
lib/libpt_linux_x86_r.so: undefined reference to `PVideoOutputDevice::Stop()'
lib/libpt_linux_x86_r.so: undefined reference to `PVideoOutputDevice::Start()'
lib/libpt_linux_x86_r.so: undefined reference to `vtable for PVideoDevice'
lib/libpt_linux_x86_r.so: undefined reference to `vtable for PVideoInputDevice'
lib/libpt_linux_x86_r.so: undefined reference to `typeinfo for PVideoOutputDevice'
lib/libpt_linux_x86_r.so: undefined reference to `vtable for PVideoOutputDeviceRGB'
lib/libpt_linux_x86_r.so: undefined reference to `VTT for PVideoChannel'
lib/libpt_linux_x86_r.so: undefined reference to `vtable for PVideoChannel'
lib/libpt_linux_x86_r.so: undefined reference to `vtable for PVideoFrameInfo'
lib/libpt_linux_x86_r.so: undefined reference to `typeinfo for PVideoFrameInfo'
lib/libpt_linux_x86_r.so: undefined reference to `PVideoDevice::SetFrameSizeConverter(unsigned int, unsigned int, int)'
lib/libpt_linux_x86_r.so: undefined reference to `typeinfo for PVideoInputDevice'
lib/libpt_linux_x86_r.so: undefined reference to `vtable for PVideoOutputDevice'
collect2: ld a retourné 1 code d'état d'exécution

I can build and link with gcc-4.1 from debian sid without problem, but i can't
upgrade my gcc. My c++ knownledges with pure and virtual fonctions is far from
good, but perhaps this link will help:

        http://centibyte.org/me/obscure-errors.html

I've try to find where the virtual function is missing but only correct the
first one with this patch:

# HG changeset patch
# User "Luc Saillard <luc saillard org>"
# Date 1191336108 -7200
# Node ID 8e16f0aafe552ff2c1ad5bb7f64650187e1886dd
# Parent  11a6f733e22458facaad72e595410f5a5038cb1c
remove some errors with g++-3.4

diff -r 11a6f733e224 -r 8e16f0aafe55 include/ptlib/videoio.h
--- a/include/ptlib/videoio.h	Tue Oct 02 16:40:21 2007 +0200
+++ b/include/ptlib/videoio.h	Tue Oct 02 16:41:48 2007 +0200
@@ -815,15 +815,15 @@ class PVideoOutputDevice : public PVideo
 
     /**Close the device.
       */
-    virtual BOOL Close() { return TRUE; }
+    virtual BOOL Close();
 
     /**Start the video device I/O display.
       */
-    virtual BOOL Start() { return TRUE; }
+    virtual BOOL Start();
 
     /**Stop the video device I/O display.
       */
-    virtual BOOL Stop() { return TRUE; }
+    virtual BOOL Stop();
 
     /** Is the device a camera, and obtain video
      */
diff -r 11a6f733e224 -r 8e16f0aafe55 src/ptlib/common/videoio.cxx
--- a/src/ptlib/common/videoio.cxx	Tue Oct 02 16:40:21 2007 +0200
+++ b/src/ptlib/common/videoio.cxx	Tue Oct 02 16:41:48 2007 +0200
@@ -1173,6 +1173,20 @@ BOOL PVideoOutputDevice::CanCaptureVideo
   return FALSE;
 }
 
+BOOL PVideoOutputDevice::Close()
+{
+  return TRUE;
+}
+
+BOOL PVideoOutputDevice::Start()
+{
+  return TRUE;
+}
+
+BOOL PVideoOutputDevice::Stop()
+{
+  return TRUE;
+}
 
 BOOL PVideoOutputDevice::GetPosition(int &, int &) const
 {

And now i got this when linking the little program:

# g++-3.4 t.c -lpt_linux_x86_r -Llib 
lib/libpt_linux_x86_r.so: undefined reference to `vtable for PVideoDevice'
lib/libpt_linux_x86_r.so: undefined reference to `vtable for PVideoInputDevice'
lib/libpt_linux_x86_r.so: undefined reference to `typeinfo for PVideoOutputDevice'
lib/libpt_linux_x86_r.so: undefined reference to `vtable for PVideoOutputDeviceRGB'
lib/libpt_linux_x86_r.so: undefined reference to `VTT for PVideoChannel'
lib/libpt_linux_x86_r.so: undefined reference to `vtable for PVideoChannel'
lib/libpt_linux_x86_r.so: undefined reference to `vtable for PVideoFrameInfo'
lib/libpt_linux_x86_r.so: undefined reference to `typeinfo for PVideoFrameInfo'
lib/libpt_linux_x86_r.so: undefined reference to `PVideoDevice::SetFrameSizeConverter(unsigned int, unsigned int, int)'
lib/libpt_linux_x86_r.so: undefined reference to `typeinfo for PVideoInputDevice'
lib/libpt_linux_x86_r.so: undefined reference to `vtable for PVideoOutputDevice'
collect2: ld a retourné 1 code d'état d'exécution

Any idea to fix the problem ?

Luc
_______________________________________________
Ekiga-devel-list mailing list
Ekiga-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/ekiga-devel-list

*****************************************************************
This e-mail and any files transmitted with it may be proprietary 
and are intended solely for the use of the individual or entity to 
whom they are addressed. If you have received this e-mail in 
error please notify the sender. Please note that any views or
opinions presented in this e-mail are solely those of the author 
and do not necessarily represent those of ITT Corporation. The 
recipient should check this e-mail and any attachments for the 
presence of viruses. ITT accepts no liability for any damage 
caused by any virus transmitted by this e-mail.
*******************************************************************




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]