I guess in that case it is the MODULES line at the end. :)
(Please keep the conversation on the list so that others can benefit from it as 
well, thank you)

From: Sina Gerlach [mailto:sina.gerlac...@gmx.de]
Sent: Dienstag, 13. Oktober 2015 14:24
To: Kislinskiy, Stefan
Subject: Aw: RE: [mitk-users] error LNK2019: unresolved external symbol

Hi Stefan,
thanks for the fast response.
I'm not quite sure where to add that mentioned line.
This is what my cmakelists looks like:

project(AwesomeApp)
set(_app_options)
if(${MY_PROJECT_NAME}_SHOW_CONSOLE_WINDOW)
  list(APPEND _app_options SHOW_CONSOLE)
endif()
# Plug-ins listed below will not be
#  - added as a build-time dependency to the executable
#  - listed in the provisioning file for the executable
#  - installed if they are external plug-ins
set(_exclude_plugins
)
mitkFunctionCreateBlueBerryApplication(
  NAME ${MY_APP_NAME}
  DESCRIPTION "MITK - ${MY_APP_NAME} Application"
  EXCLUDE_PLUGINS ${_exclude_plugins}
  ${_app_options}
)
mitk_use_modules(TARGET ${MY_APP_NAME}
  MODULES MitkAppUtil
  PACKAGES Qt4|QtGui Qt5|Widgets
)

Best
Sina
Gesendet: Dienstag, 13. Oktober 2015 um 14:00 Uhr
Von: "Kislinskiy, Stefan" 
<s.kislins...@dkfz-heidelberg.de<mailto:s.kislins...@dkfz-heidelberg.de>>
An: "Sina Gerlach" <sina.gerlac...@gmx.de<mailto:sina.gerlac...@gmx.de>>, 
"mitk-users@lists.sourceforge.net<mailto:mitk-users@lists.sourceforge.net>" 
<mitk-users@lists.sourceforge.net<mailto:mitk-users@lists.sourceforge.net>>
Betreff: RE: [mitk-users] error LNK2019: unresolved external symbol
Hi Sina,

it seems that the linker isn’t able to find mitk::DataNodeFactory, which is 
located in the MitkLegacyIO module. Add MitkLegacyIO to the DEPENDS line of 
your module CMakeLists.txt.

Best,
Stefan

From: Sina Gerlach [mailto:sina.gerlac...@gmx.de]
Sent: Dienstag, 13. Oktober 2015 12:27
To: mitk-users@lists.sourceforge.net<mailto:mitk-users@lists.sourceforge.net>
Subject: [mitk-users] error LNK2019: unresolved external symbol

Hello,

I am new to MITK and am trying to use the MITK Tutorial to display an image in 
my own Qt User Interface.

When trying to build my project the following error occurs:

7>     Creating library 
C:/MITK-pt-sb/AwesomeProject-build/bin/Debug/AwesomeApp.lib and object 
C:/MITK-pt-sb/AwesomeProject-build/bin/Debug/AwesomeApp.exp
7>MainWindow.obj : error LNK2019: unresolved external symbol 
"__declspec(dllimport) public: static class itk::SmartPointer<class 
mitk::DataNodeFactory> __cdecl mitk::DataNodeFactory::New(void)" 
(__imp_?New@DataNodeFactory@mitk@@SA?AV?$SmartPointer@VDataNodeFactory@mitk@@@itk@@XZ)
 referenced in function "public: void __cdecl 
MainWindow::on_openButton_pressed(void)" 
(?on_openButton_pressed@MainWindow@@QEAAXXZ)


I know this is a linker problem but I dont know which library to link or what 
else has to be done to solve this error.

I hope anyone can help

Best Regards
Sina
------------------------------------------------------------------------------
_______________________________________________
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to