2

Compiling and linking a shader widget for EB GUIDE 6.8 for QNX 7.0 works fine, but when GTF opens the shared object, I get the error message: undefined reference to `typeinfo for gtf::scdr::RenderObjectBase' on the console and the plugin doesn't work (is not loaded).

I checked for the usage of the named type, but I don't use it.

GTF should be able to load the shared object and execute the widget.

1 Answers1

1

This message typically is printed when the plugin is compiled with RTTI enabled. GTF is compiled without RTTI.

Adding this -fno-rtti to your compiler calls should fix the problem.

You can do this, for example, in a toolchain file in case you're using CMake:

if (CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "QNX")
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti")
    message(STATUS "disabled RTTI for Linux/Qnx")
endif ()

Bye the way, when compiling for Linux we got this error message already when linking the shared object. See also g++ undefined reference to typeinfo for more information.

flba
  • 379
  • 1
  • 11