[Paraview-developers] how do I link library to my reader plugin?
Joshua Murphy
Joshua.Murphy at lasp.colorado.edu
Wed Nov 7 15:45:54 EST 2012
Attached is a file with the output
Thanks,
Josh
From: David E DeMarle <dave.demarle at kitware.com<mailto:dave.demarle at kitware.com>>
Date: Wednesday, November 7, 2012 2:40 PM
To: Joshua Murphy <Joshua.Murphy at lasp.colorado.edu<mailto:Joshua.Murphy at lasp.colorado.edu>>
Cc: Utkarsh Ayachit <utkarsh.ayachit at kitware.com<mailto:utkarsh.ayachit at kitware.com>>, "paraview-developers at paraview.org<mailto:paraview-developers at paraview.org>" <paraview-developers at paraview.org<mailto:paraview-developers at paraview.org>>
Subject: Re: [Paraview-developers] how do I link library to my reader plugin?
I see now that it is already there in KIT_LIBS.
Please do send the make output though.
David E DeMarle
Kitware, Inc.
R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4909
On Wed, Nov 7, 2012 at 3:35 PM, David E DeMarle <dave.demarle at kitware.com<mailto:dave.demarle at kitware.com>> wrote:
Try adding cxform to your second target_link_libraries call to make the reader know that it needs symbols from that library.
If that doesn't work, please post the output of make VERBOSE=1 in your build directory.
David E DeMarle
Kitware, Inc.
R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4909<tel:518-881-4909>
On Wed, Nov 7, 2012 at 3:00 PM, Joshua Murphy <Joshua.Murphy at lasp.colorado.edu<mailto:Joshua.Murphy at lasp.colorado.edu>> wrote:
Here it is:
12:49:15: Running steps for project Enlil Reader 2.0.1...
12:49:15: Starting: "/usr/bin/make"
-- Configuring done
-- Generating done
-- Build files have been written to: /Volumes/Data/Development/vtkPlugins/PV4-201-build
[ 11%] Built target cxform
[ 17%] Built target cxtest
[ 23%] Generating qrc_vtkEnlilReader.cxx
Scanning dependencies of target vtkEnlilReader
[ 29%] Building CXX object CMakeFiles/vtkEnlilReader.dir/qrc_vtkEnlilReader.cxx.o
Linking CXX shared library libvtkEnlilReader.dylib
Undefined symbols for architecture x86_64:
"gregorian_calendar_to_jd(int, int, int, int, int, int)", referenced from:
vtkEnlilReader::calculateArtifacts() in vtkEnlilReader.cxx.o
"date2es(int, int, int, int, int, int)", referenced from:
vtkEnlilReader::calculateArtifacts() in vtkEnlilReader.cxx.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make[2]: *** [libvtkEnlilReader.dylib] Error 1
make[1]: *** [CMakeFiles/vtkEnlilReader.dir/all] Error 2
make: *** [all] Error 2
12:49:16: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project Enlil Reader 2.0.1 (target: Desktop)
When executing step 'Make'
-Josh
From: Utkarsh Ayachit <utkarsh.ayachit at kitware.com<mailto:utkarsh.ayachit at kitware.com>>
Date: Wednesday, November 7, 2012 1:59 PM
To: Joshua Murphy <Joshua.Murphy at lasp.colorado.edu<mailto:Joshua.Murphy at lasp.colorado.edu>>
Cc: "paraview-developers at paraview.org<mailto:paraview-developers at paraview.org>" <paraview-developers at paraview.org<mailto:paraview-developers at paraview.org>>
Subject: Re: [Paraview-developers] how do I link library to my reader plugin?
Can you post the error that you are seeing now? Thanks.
On Wed, Nov 7, 2012 at 2:58 PM, Joshua Murphy <Joshua.Murphy at lasp.colorado.edu<mailto:Joshua.Murphy at lasp.colorado.edu>> wrote:
I have figured out the vtkRenderingMatplotlib linking problem, but still cannot seem to link my own library correctly…
-Josh
From: Joshua Murphy <Joshua.Murphy at lasp.colorado.edu<mailto:Joshua.Murphy at lasp.colorado.edu>>
Date: Wednesday, November 7, 2012 1:43 PM
To: "paraview-developers at paraview.org<mailto:paraview-developers at paraview.org>" <paraview-developers at paraview.org<mailto:paraview-developers at paraview.org>>
Subject: [Paraview-developers] how do I link library to my reader plugin?
Hello,
I have a quick question, that I hope someone can answer quickly.
I am trying to add the NASA cxform library to my reader (ParaView 3.98 RC1) so I can do some transformation, but I can running into some problems.
I have the following CMake files:
Project:
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
PROJECT("Enlil Reader 2.0.1")
#SET(ParaView_DIR /Users/sysop/Developer/pv/build)
SET(ParaView_DIR /Volumes/Data/Development/ParaView-src/git-version/build-2Nov12)
#SET(ParaView_DIR /Volumes/Data/Development/ParaView/git-clean/build-13595/)
set(CMAKE_CXX_FLAGS "-O3") ## Optimize
set(CMAKE_EXE_LINKER_FLAGS "-s") ## Strip binary
FIND_PACKAGE(ParaView REQUIRED)
INCLUDE(${PARAVIEW_USE_FILE})
ADD_SUBDIRECTORY(cxform-0.71)
Find_Library(cxform REQUIRED)
include_directories(cxform-0.71)
Add_Executable(cxtest cxform-0.71/main.c)
target_link_libraries(cxtest cxform)
ADD_PARAVIEW_PLUGIN(vtkEnlilReader "2.0.1"
SERVER_MANAGER_XML vtkEnlilReader.xml
SERVER_MANAGER_SOURCES vtkEnlilReader.cxx
SOURCES DateTime.C
GUI_RESOURCE_FILES vtkEnlilGUI.xml)
SET(KIT_LIBS cxform vtkNetCDF_cxx)
Target_LINK_LIBRARIES(vtkEnlilReader ${ParaView_LIBRARIES} ${KIT_LIBS})
================================================================
And my Library CMAKE file:
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
PROJECT("CXForm - Enlil")
add_library(
cxform
STATIC
cxform-auto.c
cxform-manual.c
)
================================================================
My test executable links fine,and runs fine, but the plugin gives me the following error:
12:38:31: Running steps for project Enlil Reader 2.0.1...
12:38:31: Starting: "/usr/bin/make"
-- Configuring done
-- Generating done
-- Build files have been written to: /Volumes/Data/Development/vtkPlugins/PV4-201-build
[ 11%] Built target cxform
[ 17%] Built target cxtest
[ 23%] Generating qrc_vtkEnlilReader.cxx
Scanning dependencies of target vtkEnlilReader
[ 29%] Building CXX object CMakeFiles/vtkEnlilReader.dir/qrc_vtkEnlilReader.cxx.o
Linking CXX shared library libvtkEnlilReader.dylib
Undefined symbols for architecture x86_64:
"gregorian_calendar_to_jd(int, int, int, int, int, int)", referenced from:
vtkEnlilReader::calculateArtifacts() in vtkEnlilReader.cxx.o
"date2es(int, int, int, int, int, int)", referenced from:
vtkEnlilReader::calculateArtifacts() in vtkEnlilReader.cxx.o
"vtkRenderingMatplotlib_AutoInit_Construct()", referenced from:
global constructors keyed to _Z38vtkEnlilReadervtkEnlilReaderInterfacesvin vtkEnlilReader_Plugin.cxx.o
global constructors keyed to _ZN21vtkEnlilReader_Plugin18qt_static_metacallEP7QObjectN11QMetaObject4CallEiPPvin moc_vtkEnlilReader_Plugin.cxx.o
"vtkRenderingMatplotlib_AutoInit_Destruct()", referenced from:
___tcf_7 in vtkEnlilReader_Plugin.cxx.o
___tcf_5 in moc_vtkEnlilReader_Plugin.cxx.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make[2]: *** [libvtkEnlilReader.dylib] Error 1
make[1]: *** [CMakeFiles/vtkEnlilReader.dir/all] Error 2
make: *** [all] Error 2
12:38:32: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project Enlil Reader 2.0.1 (target: Desktop)
When executing step 'Make'
Can someone tell me how to properly link to my library?
Thanks,
Josh
[cid:DD991949-2449-49DA-97DD-0219C5774392]
Joshua J. Murphy
Computer Scientist
Laboratory for Atmospheric and Space Physics
University of Colorado, Boulder
_______________________________________________
Paraview-developers mailing list
Paraview-developers at paraview.org<mailto:Paraview-developers at paraview.org>
http://public.kitware.com/mailman/listinfo/paraview-developers
_______________________________________________
Paraview-developers mailing list
Paraview-developers at paraview.org<mailto:Paraview-developers at paraview.org>
http://public.kitware.com/mailman/listinfo/paraview-developers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20121107/e8356ab4/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: A93D829A-3C2C-4769-925A-35900ECAAE2C[3].png
Type: image/png
Size: 16467 bytes
Desc: A93D829A-3C2C-4769-925A-35900ECAAE2C[3].png
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20121107/e8356ab4/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: log
Type: application/octet-stream
Size: 341244 bytes
Desc: log
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20121107/e8356ab4/attachment-0001.obj>
More information about the Paraview-developers
mailing list