[Interest] Linker error: undefined reference to symbol 'g_type_check_instance_cast'

vaishnavi nagarajan vaishnavi_rajan at yahoo.com
Mon Aug 3 22:50:34 CEST 2015


sounggst is one of my sources. It includes the gst.h header from gstreamer-1.0.
That symbol is provided by libgobject-2.0. I have added the library in LIBS += as:QMAKE_LIBDIR_FLAGS += -L/usr/lib/x86_64-linux-gnu
QMAKE_LFLAGS   += -lgmodule-2.0 \                          -lxml2 \                          -lgobject-2.0 \                          -lgthread-2.0 \                          -lrt \                          -lglib-2.0 \                          -lpthread \                          -lgstreamer-1.0

I cross verified to make sure the library contains the symbol. I even upgraded my system. But still the error persists.I tried to follow the solutions provided in these links:http://stackoverflow.com/questions/19901934/strange-linking-error-dso-missing-from-command-line

 Thanks and Regards,
Vaishnavi 


     On Monday, August 3, 2015 6:03 PM, Thiago Macieira <thiago.macieira at intel.com> wrote:
   

 On Monday 03 August 2015 15:58:05 vaishnavi nagarajan wrote:
> /usr/bin/ld: soundgst.o: undefined reference to symbol
> 'g_type_check_instance_cast'

There's no file called "soundgst" in the Qt sources. That means the error above 
comes from your sources.

The function "g_type_check_instance_cast" is not a Qt one (probably Glib, 
given its name), so it's up to you to figure it out.

Here's what you need to do:
 1) what library provides that symbol? Have you checked the function's API 
documentation to see what library that is? Make sure that you have that 
library in LIBS +=

 2) make sure the library actually contains that symbol. Use nm -D on the 
library to list all symbols and confirm it's there.

 3) if it's not there, check where the symbol got declared from. Was it from a 
system-installed header? If so, you have mismatching header and library 
installations -- fix your system. If it got declared from your own sources, fix 
your sources.

> (kit: Desktop Qt 5.0.2 GCC 64bit)

Upgrade. Now.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center



  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20150803/a5c1545d/attachment.html>


More information about the Interest mailing list