Hi Simon,<div><br></div><div>You do not need to modify the avt file or add the revision macro as that is not the problem you are currently facing. I would try reverting your avt file to its original content, adding all the files listed in the <span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; ">Files components="M" xml block to your SOURCES list,</span> and adding the plugin build folder to your LD_LIBRARY_PATH.</div>
<div><br></div><div>Also would you be able to send me the contents of the <span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; ">vtkVisItReaderGFDL.cxx from your build directory and I will confirm the automatic wrapping is working properly.</span><br>
<br><div class="gmail_quote">On Mon, Apr 11, 2011 at 3:02 PM, Simon Su <span dir="ltr"><<a href="mailto:newsgroup4ssu@gmail.com">newsgroup4ssu@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi Robert,<br><br>I inferred a CMakeLists.txt from the wiki page<br><br><br>================ CMakeLists.txt for the plugin<br><br>PROJECT(VisItReaderGFDL)<br><br>cmake_minimum_required(VERSION 2.8)<br><br>FIND_PACKAGE(ParaView REQUIRED)<br>
INCLUDE(${PARAVIEW_USE_FILE})<br><br>SET(SOURCES<br> avtCM24FileFormat.C<br> )<br><br>ADD_VISIT_PLUGIN_READER(VisItReaderGFDL "1.0"<br> VISIT_READER_NAME "avtCM24FileFormat"<br> VISIT_READER_TYPE "MTSD"<br>
VISIT_READER_FILE_PATTERN "nc"<br> SERVER_SOURCES ${SOURCES}<br> )<br><br>TARGET_LINK_LIBRARIES(VisItReaderGFDL vtkVisItAVTAlgorithms)<br>============================<br><br>I then placed the .C and .h files in the same directory<br>
sms:/local/home/build/paraview-plugin> ls -alF gfdl-paraview-loader<br>total 112<br>drwxr-xr-x 2 sms t 4096 Apr 11 14:53 ./<br>drwxr-xr-x 5 sms t 4096 Apr 11 14:20 ../<br>-rw-r--r-- 1 sms t 87958 Apr 11 12:51 avtCM24FileFormat.C<br>
-rw-r--r-- 1 sms t 7311 Apr 11 14:25 avtCM24FileFormat.h<br>-rw-r--r-- 1 sms t 404 Apr 11 13:02 CMakeLists.txt<br><br><br>Then in the build directory, I did a ccmake and entered the right text for ParaView_DIR variable and I got this after configure/generate/make<br>
<br>sms:/local/home/build/paraview-plugin/gfdl-paraview-loader-build> ls -alF<br>total 228<br>drwxr-xr-x 3 sms t 4096 Apr 11 14:25 ./<br>drwxr-xr-x 5 sms t 4096 Apr 11 14:20 ../<br>-rw-r--r-- 1 sms t 42197 Apr 11 14:24 CMakeCache.txt<br>
drwxr-xr-x 6 sms t 4096 Apr 11 14:25 CMakeFiles/<br>-rw-r--r-- 1 sms t 1691 Apr 11 14:24 cmake_install.cmake<br>-rwxr-xr-x 1 sms t 74174 Apr 11 14:25 libVisItReaderGFDL.so*<br>-rw-r--r-- 1 sms t 12258 Apr 11 14:24 Makefile<br>
-rw-r--r-- 1 sms t 2685 Apr 11 14:24 moc_VisItReaderGFDL_Plugin.cxx<br>-rw-r--r-- 1 sms t 3376 Apr 11 14:24 qrc_VisItReaderGFDL.cxx<br>-rw-r--r-- 1 sms t 578 Apr 11 14:24 VisItReaderGFDLInit.cxx<br>-rw-r--r-- 1 sms t 4308 Apr 11 14:24 VisItReaderGFDL_Plugin.cxx<br>
-rw-r--r-- 1 sms t 3809 Apr 11 14:24 VisItReaderGFDL_Plugin.h<br>-rw-r--r-- 1 sms t 163 Apr 11 14:24 VisItReaderGFDL.qrc<br>-rw-r--r-- 1 sms t 1045 Apr 11 14:24 vtkSMVisItReaderGFDLInstantiator.cxx<br>-rw-r--r-- 1 sms t 464 Apr 11 14:24 vtkSMVisItReaderGFDLInstantiator.h<br>
-rw-r--r-- 1 sms t 5473 Apr 11 14:24 vtkSMXML_VisItReaderGFDL.h<br>-rw-r--r-- 1 sms t 4705 Apr 11 14:24 vtkVisItReaderGFDLClientServer.cxx<br>-rw-r--r-- 1 sms t 4025 Apr 11 14:24 vtkVisItReaderGFDL.cxx<br>-rw-r--r-- 1 sms t 1740 Apr 11 14:24 vtkVisItReaderGFDLExport.h<br>
-rw-r--r-- 1 sms t 151 Apr 11 14:24 vtkVisItReaderGFDLGUI.xml<br>-rw-r--r-- 1 sms t 2194 Apr 11 14:24 vtkVisItReaderGFDL.h<br>-rw-r--r-- 1 sms t 4169 Apr 11 14:24 vtkVisItReaderGFDLSM.xml<br><br><br>however, loading the plugin using plugin manager gui resulted in an error <br>
<br>Cannot load library /local/home/build/paraview-plugin/gfdl-paraview-loader-build/libVisItReaderGFDL.so: (/local/home/build/paraview-plugin/gfdl-paraview-loader-build/libVisItReaderGFDL.so: undefined symbol: _ZTI17avtCM24FileFormat)<br>
<br>then from your plugin wiki page, I added the following line into my avtCM24FileFormat.h file<br><br>vtkCxxRevisionMacro(VisItReaderGFDL, "$Revision$");<br><br>but when I compile, I get<br><br>sms:/local/home/build/paraview-plugin/gfdl-paraview-loader-build> make<br>
[ 9%] Generating moc_VisItReaderGFDL_Plugin.cxx<br>[ 18%] Generating vtkVisItReaderGFDLClientServer.cxx<br>[ 27%] Generating qrc_VisItReaderGFDL.cxx<br>[ 36%] Generating vtkSMXML_VisItReaderGFDL.h<br>-- Generate module: vtkVisItReaderGFDLSM<br>
[ 45%] Building CXX object CMakeFiles/VisItReaderGFDL.dir/qrc_VisItReaderGFDL.cxx.o<br>[ 54%] Building CXX object CMakeFiles/VisItReaderGFDL.dir/vtkVisItReaderGFDL.cxx.o<br>/local/home/build/paraview-plugin/gfdl-paraview-loader/avtCM24FileFormat.h:45: error: 'VisItReaderGFDL' has not been declared<br>
/local/home/build/paraview-plugin/gfdl-paraview-loader/avtCM24FileFormat.h: In function 'void CollectRevisions(std::ostream&)':<br>/local/home/build/paraview-plugin/gfdl-paraview-loader/avtCM24FileFormat.h:45: error: invalid use of 'this' in non-member function<br>
/local/home/build/paraview-plugin/gfdl-paraview-loader/avtCM24FileFormat.h:45: error: 'Superclass' has not been declared<br>make[2]: *** [CMakeFiles/VisItReaderGFDL.dir/vtkVisItReaderGFDL.cxx.o] Error 1<br>make[1]: *** [CMakeFiles/VisItReaderGFDL.dir/all] Error 2<br>
make: *** [all] Error 2<br><br>and actually, my plugin code also depend on both netcdf and hdf5 library which is specified in my VisIt xml file <br><br>sms:/local/home/build/paraview-plugin/gfdl-visit-load> cat CM24.xml<br>
<?xml version="1.0"?><br> <Plugin name="CM24" type="database" label="NetCDF CM2.4" version="1.0" enabled="true" mdspecificcode="false" engspecificcode="false" onlyengine="false" noengine="false" dbtype="MTSD" haswriter="false" hasoptions="false"><br>
<CXXFLAGS><br> -I/net/sms/tools/VisIt/VisIt-2.2.1/sms.Linux-2.6.18-194.26.1.el5.x86_64.gcc-4.1.2.release/current/linux-x86_64/include/netcdf<br> -Wno-deprecated<br> </CXXFLAGS><br> <LIBS><br>
/local/home/tools/VisIt/VisIt-2.2.1/sms.Linux-2.6.18-194.26.1.el5.x86_64.gcc-4.1.2.release/current/linux-x86_64/archives/libnetcdf.a<br> /local/home/tools/VisIt/VisIt-2.2.1/sms.Linux-2.6.18-194.26.1.el5.x86_64.gcc-4.1.2.release/current/linux-x86_64/lib/libhdf5_hl.a<br>
/local/home/tools/VisIt/VisIt-2.2.1/sms.Linux-2.6.18-194.26.1.el5.x86_64.gcc-4.1.2.release/current/linux-x86_64/lib/libhdf5.a<br> /local/home/tools/VisIt/VisIt-2.2.1/sms.Linux-2.6.18-194.26.1.el5.x86_64.gcc-4.1.2.release/current/linux-x86_64/lib/libsz.a<br>
</LIBS><br> <FilePatterns><br> *.nc<br> </FilePatterns><br> <Files components="M"><br> avtCM24FileFormat.C<br> NETCDFFileObject.C<br> </Files><br> <Files components="E"><br>
avtCM24FileFormat.C<br> NETCDFFileObject.C<br> </Files><br> <Attribute name="" purpose="" persistent="true" keyframe="true" exportAPI="" exportInclude=""><br>
</Attribute><br> </Plugin><br><br>how do I go about adding the appropriate netcdf and hdf5 libraries into the plugin CMakeLists.txt file? <br><br>any help is much appreciated.<br><br>thank you<br><font color="#888888">-simon</font><div>
<div></div><div class="h5"><br>
<br><br><br><br><div class="gmail_quote">On Mon, Apr 11, 2011 at 8:25 AM, Robert Maynard <span dir="ltr"><<a href="mailto:robert.maynard@kitware.com" target="_blank">robert.maynard@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
Hi Simon,<br>
<br>
You do not need to place the CMakeLists.txt inside ParaView at all to<br>
build a plugin. You just need to set that folder as the source folder<br>
for CMake, and set a different directory as the plugin build<br>
directory. After that you will need to set ParaView_DIR to your<br>
ParaView build directory.<br>
<br>
I would also look over: <a href="http://www.paraview.org/Wiki/Plugin_HowTo" target="_blank">http://www.paraview.org/Wiki/Plugin_HowTo</a> for<br>
my information on building plugins.<br>
<div><div></div><div><br>
On Fri, Apr 8, 2011 at 5:12 PM, Simon Su <<a href="mailto:newsgroup4ssu@gmail.com" target="_blank">newsgroup4ssu@gmail.com</a>> wrote:<br>
> Hi there,<br>
><br>
> I have silo plugin working and now I would like to try out adding my own<br>
> VisIt database plugin to ParaView.<br>
> <a href="http://www.cmake.org/Wiki/VisIt_Database_Bridge" target="_blank">http://www.cmake.org/Wiki/VisIt_Database_Bridge</a> mentioned how to write the<br>
> CMakeLists.txt file but where do I need to place the files ( CMakeLists.txt,<br>
> and avtMyReaderFileFormat.C) in the source tree of ParaView to be pickup by<br>
> the cmake process?<br>
><br>
> thanks<br>
> -simon<br>
><br>
</div></div>> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Please keep messages on-topic and check the ParaView Wiki at:<br>
> <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
><br>
><br>
<br>
<br>
<br>
--<br>
<font color="#888888">Robert Maynard<br>
</font></blockquote></div><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Robert Maynard<br>
</div>