[Ekiga-devel-list] Build error with pwlib head and gcc-3.4.6
- From: Luc Saillard <luc saillard org>
- To: ekiga-devel-list gnome org
- Subject: [Ekiga-devel-list] Build error with pwlib head and gcc-3.4.6
- Date: Tue, 2 Oct 2007 16:48:39 +0200
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]