Hi Stefan,
Thanks for your quick answer. I've tried your suggestion but I still have the
problem.
Following your tip, my CMakeLists looks like this:
MITK_CREATE_MODULE(
INCLUDE_DIRS
PRIVATE src
PUBLIC ${MYMODULE_INCLUDES_DIR}
DEPENDS PUBLIC MitkCore MitkAnnotation
PACKAGE_DEPENDS
PUBLIC
VTK|vtkFiltersFlowPaths ITK|ITKRegistrationCommon+ITKImageStatistics+ITKVNL
OpenCV
# VTK|vtkFiltersFlowPaths ITK OpenCV
)
target_link_libraries(${MODULE_TARGET} PUBLIC ${MYMODULE_LIBRARIES}
C:/00_gwenael/mitk/build/ep/lib/itkvnl_algo-4.13d.lib)
I've copied the full path for now to make sure that it is pointing to the
actual library.
The two errors I get:
Error LNK2019 unresolved external symbol "__declspec(dllimport) public: __cdecl
vnl_gaussian_kernel_1d::vnl_gaussian_kernel_1d(double,double)"
(__imp_??0vnl_gaussian_kernel_1d@@QEAA@NN@Z) referenced in function "void
__cdecl blah(void)" (?blah@@YAXXZ) MitkMyModule
C:\00_gwenael\mitk\build\MITK-build\Modules\SeaBreeze2\bklyn_itk.obj 1
Error LNK2019 unresolved external symbol "__declspec(dllimport) public: __cdecl
vnl_gaussian_kernel_1d::~vnl_gaussian_kernel_1d(void)"
(__imp_??1vnl_gaussian_kernel_1d@@QEAA@XZ) referenced in function "void __cdecl
blah(void)" (?blah@@YAXXZ) MitkMyModule
C:\00_gwenael\mitk\build\MITK-build\Modules\SeaBreeze2\bklyn_itk.obj 1
Best,
Gwenael
Sent from Outlook<http://aka.ms/weboutlook>
________________________________
From: Dinkelacker, Stefan <[email protected]>
Sent: 19 November 2019 10:19
To: Gwenael G <[email protected]>; [email protected]
<[email protected]>
Subject: RE: using vnl_algo
Hi,
Searching for “vnl_gaussian_kernel_1d” in MITK-superbuild/ep/src/ITK reveals
that it is located in the itkvnl_algo target. Adding it your target link
libraries should do the trick.
Best,
Stefan
From: Gwenael G [mailto:[email protected]]
Sent: Tuesday, November 19, 2019 10:16 AM
To: [email protected]
Subject: [mitk-users] using vnl_algo
Hi All,
I've been trying to use some vnl_algo classes in an MITK module I am developing
in Windows. Unfortunately, the module code doesn't link.
This is the line of code that compiles but doesn't link:
vnl_gaussian_kernel_1d k(0.0);
The CMakeLists:
MITK_CREATE_MODULE(
INCLUDE_DIRS
PRIVATE src
PUBLIC ${MYMODULE_INCLUDES_DIR}
DEPENDS PUBLIC MitkCore MitkAnnotation
PACKAGE_DEPENDS
PUBLIC
VTK|vtkFiltersFlowPaths ITK|ITKRegistrationCommon+ITKImageStatistics+ITKVNL
OpenCV
)
target_link_libraries(${MODULE_TARGET} PUBLIC ${MYMODULE_LIBRARIES})
Furthermore, when looking at the project in Visual Studio
(properties->Linker->Input->Additional Dependencies), the vnl_algo lib is there.
I am using the ITK from the superbuild.
Best,
Gwenael
Sent from Outlook<http://aka.ms/weboutlook>
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users