Hi,

My application uses QPlugins. These plugins are a glue between my application objetcs and several libraries. Anyway, in a plugin project file I just specify :

Qt Code:
  1. TEMPLATE = lib
  2. CONFIG += plugin release
  3. ...
  4. INCLUDEPATH += /Path/To/The/Application/Headers
  5. HEADERS += Plugin.h
  6. SOURCES += Plugin.cpp
To copy to clipboard, switch view to plain text mode 

So of course, running nm on the library tells that several symbols are undefined. No problem, they will be found at runtime since the application defines them. It works perfectly well on linux when the plugin config is not set.

To make this compile on MacOsX you need to add in your project file :

Qt Code:
  1. QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.3
  2. QMAKE_LFLAGS += -undefined dynamic_lookup
To copy to clipboard, switch view to plain text mode 

So the plugin works on MacOSX but on linux I have undefined symbols at runtime : symbol lookup error. These problems only occurs with function defined in a source file within a namespace. Declaring them in the header solves the problem but this is not a solution.

By default objects are compiled with -fPIC and the plugin is linked with -shared so that it should work but it doesn't

Does anybody have a solution to make my plugins work on linux ?