[Paraview] Plugins deployment with external lib: Windows wants STATIC ?

Jérôme jerome.velut at gmail.com
Tue Dec 16 10:18:12 EST 2008


Hi,

I am writing plugins under Fedora that need to be run on Windows. I
have to link the plugin to another lib, let's say myGenericLib,
included in the project. With Linux, I have to build a SHARED lib.

#######
CMake generates myGenericLib through:

ADD_LIBRARY( myGenericLib SHARED file cxx file.h )
TARGET_LINK( myGenericLib vtkIO vtkFiltering and_so_one )
If not (that is, if I use a STATIC fashion), I get a link error.

########
CMake generates the plugin project through:

 ADD_PARAVIEW_PLUGIN(
   Extensions          #<--Name for the plugin
  "1.0"                        #<--Version string
   SERVER_MANAGER_XML Extensions.xml  #<-- server manager xml
   SERVER_MANAGER_SOURCES ${PLUGINS_SRCS}
   GUI_RESOURCE_FILES ExtensionsGUI.xml
 )

TARGET_LINK_LIBRARIES( Extensions myGenericLib )

But when I build with ms-visual2008 express with SHARED, the plugin
compiles but ParaView tells "... is not a valid Qt plugin". I have to
build myGenericLib as STATIC if I want my plugin to load and work
well.

Obviously, I can put an IF statement in my CMakeList in order to
handle different plateform. My question is more 'theoritical': why
have I to change the way the external lib is built switch the platform
?

Many thanks !

regards,
Jerome


More information about the ParaView mailing list