QVTKWidget visual studio 2017 linking issue

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

QVTKWidget visual studio 2017 linking issue

massinissa bandou
I have built VTK 7.1.1 with Qt5 on windows platform with visual studio 2017.
I have copied QVTKWidgetPlugin.lib to Qt lib as well as QVTKWidgetPlugin.dll
in Qt plugin folder. I have also obtained the QVTKWidget when opening Qt
designer. I created a new Qt project on visual studio and included the
headers and linked it with libraries generated by Cmake when building VTK.
However I got the following linking problem when compiling my project:

/MainWindow.obj : *error LNK2019: unresolved external symbol "public:
__cdecl QVTKWidget::QVTKWidget*(class QWidget *,class QFlags<enum
Qt::WindowType>)"
(??0QVTKWidget@@QEAA@PEAVQWidget@@V?$QFlags@W4WindowType@Qt@@@@@Z)
referenced in function "public: void __cdecl
Ui_MainWindowClass::setupUi(class QMainWindow *)"
(?setupUi@Ui_MainWindowClass@@QEAAXPEAVQMainWindow@@@Z)
1>C:\Users\massi\OneDrive\Desktop\ImageAnalyzer\ImageAnalyzer\x64\Release\\ImageAnalyzer.exe
: fatal error LNK1120: 1 unresolved externals/

Can you help me on this matter?

Thanks in advance!

Massinissa Bandou




-----
Software Design Engineer
--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtkusers
Software Design Engineer
Reply | Threaded
Open this post in threaded view
|

Re: QVTKWidget visual studio 2017 linking issue

shadzzz90
Hi,
Check whether QT is build on 64 bit or 32 bit ( by going in ‘about’). The libraries should be build with same version i.e. 64 or 32 bit as that of QT.

Best,
Shadab

On Wed, 2 Jan 2019 at 10:36 AM, massinissa bandou <[hidden email]> wrote:
I have built VTK 7.1.1 with Qt5 on windows platform with visual studio 2017.
I have copied QVTKWidgetPlugin.lib to Qt lib as well as QVTKWidgetPlugin.dll
in Qt plugin folder. I have also obtained the QVTKWidget when opening Qt
designer. I created a new Qt project on visual studio and included the
headers and linked it with libraries generated by Cmake when building VTK.
However I got the following linking problem when compiling my project:

/MainWindow.obj : *error LNK2019: unresolved external symbol "public:
__cdecl QVTKWidget::QVTKWidget*(class QWidget *,class QFlags<enum
Qt::WindowType>)"
(??0QVTKWidget@@QEAA@PEAVQWidget@@V?$QFlags@W4WindowType@Qt@@@@@Z)
referenced in function "public: void __cdecl
Ui_MainWindowClass::setupUi(class QMainWindow *)"
(?setupUi@Ui_MainWindowClass@@QEAAXPEAVQMainWindow@@@Z)
1>C:\Users\massi\OneDrive\Desktop\ImageAnalyzer\ImageAnalyzer\x64\Release\\ImageAnalyzer.exe
: fatal error LNK1120: 1 unresolved externals/

Can you help me on this matter?

Thanks in advance!

Massinissa Bandou




-----
Software Design Engineer
--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtkusers

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: QVTKWidget visual studio 2017 linking issue

mchinand
In reply to this post by massinissa bandou
QVTKWidgetPlugin lib is for Qt's Designer application, not for your application (i.e., doesn't provide QVTKWidget). Can you show your CMakeLists.txt file?  

On Wed, Jan 2, 2019 at 9:36 AM massinissa bandou <[hidden email]> wrote:
I have built VTK 7.1.1 with Qt5 on windows platform with visual studio 2017.
I have copied QVTKWidgetPlugin.lib to Qt lib as well as QVTKWidgetPlugin.dll
in Qt plugin folder. I have also obtained the QVTKWidget when opening Qt
designer. I created a new Qt project on visual studio and included the
headers and linked it with libraries generated by Cmake when building VTK.
However I got the following linking problem when compiling my project:

/MainWindow.obj : *error LNK2019: unresolved external symbol "public:
__cdecl QVTKWidget::QVTKWidget*(class QWidget *,class QFlags<enum
Qt::WindowType>)"
(??0QVTKWidget@@QEAA@PEAVQWidget@@V?$QFlags@W4WindowType@Qt@@@@@Z)
referenced in function "public: void __cdecl
Ui_MainWindowClass::setupUi(class QMainWindow *)"
(?setupUi@Ui_MainWindowClass@@QEAAXPEAVQMainWindow@@@Z)
1>C:\Users\massi\OneDrive\Desktop\ImageAnalyzer\ImageAnalyzer\x64\Release\\ImageAnalyzer.exe
: fatal error LNK1120: 1 unresolved externals/

Can you help me on this matter?

Thanks in advance!

Massinissa Bandou




-----
Software Design Engineer
--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtkusers

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: QVTKWidget visual studio 2017 linking issue

massinissa bandou
In reply to this post by shadzzz90
Hello, thanks for your quick reply!

I have installed *Qt 5.12.0 64x* and built VTK using CMAKE gui with *visual
studio 15 2017 win64* configuration. I have linked the generated VTK
libraries to my visual studio project (properties->Linker->General) I really
don't understand why the linking problem. Did I miss something there?



-----
Software Design Engineer
--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtkusers
Software Design Engineer
Reply | Threaded
Open this post in threaded view
|

Re: QVTKWidget visual studio 2017 linking issue

massinissa bandou
In reply to this post by mchinand
CMakeLists.txt <http://vtk.1045678.n5.nabble.com/file/t342667/CMakeLists.txt>  



-----
Software Design Engineer
--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtkusers
Software Design Engineer
Reply | Threaded
Open this post in threaded view
|

Re: QVTKWidget visual studio 2017 linking issue

Andras Lasso
You can start building an application from scratch (these examples may be good starting points: https://github.com/Kitware/VTK/tree/master/Examples/Build), but I would recommend to find a similar open-source project and fork it or contribute to that instead. You can save several years of development effort and it is much more fun to work with others.

Andras

-----Original Message-----
From: vtkusers <[hidden email]> On Behalf Of massinissa bandou
Sent: Wednesday, January 2, 2019 7:33 PM
To: [hidden email]
Subject: Re: [vtkusers] QVTKWidget visual studio 2017 linking issue

CMakeLists.txt <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fvtk.1045678.n5.nabble.com%2Ffile%2Ft342667%2FCMakeLists.txt&amp;data=02%7C01%7Classo%40queensu.ca%7Cd7feebe8d20448b8984908d67113177e%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C636820724155793401&amp;sdata=iOHejDN1kX2N2mNNXny016%2Fe3SpYIndr28rP6AhNlJA%3D&amp;reserved=0>  



-----
Software Design Engineer
--
Sent from: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fvtk.1045678.n5.nabble.com%2FVTK-Users-f1224199.html&amp;data=02%7C01%7Classo%40queensu.ca%7Cd7feebe8d20448b8984908d67113177e%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C636820724155793401&amp;sdata=5sB3XWet0Bncn1UqIYZRU%2Fkh4RxMnETfHEeM3d8Dkcc%3D&amp;reserved=0
_______________________________________________
Powered by https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&amp;data=02%7C01%7Classo%40queensu.ca%7Cd7feebe8d20448b8984908d67113177e%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C636820724155793401&amp;sdata=TKRXgvYUGhMgvJJGnfNHH9Hr4sfGe69N3EbbP3hq%2FGA%3D&amp;reserved=0

Visit other Kitware open-source projects at https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com%2Fopensource%2Fopensource.html&amp;data=02%7C01%7Classo%40queensu.ca%7Cd7feebe8d20448b8984908d67113177e%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C636820724155793401&amp;sdata=UuaKPx%2B01ZW%2FhQE%2BqenYYUgidjkxzD98z%2B3ZtYCRlcA%3D&amp;reserved=0

Please keep messages on-topic and check the VTK FAQ at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.vtk.org%2FWiki%2FVTK_FAQ&amp;data=02%7C01%7Classo%40queensu.ca%7Cd7feebe8d20448b8984908d67113177e%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C636820724155793401&amp;sdata=3FxR%2BvzIk1GbH4yr36MuqxKO8DhUugOcBa%2FSihb1Ix0%3D&amp;reserved=0

Search the list archives at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkmail.org%2Fsearch%2F%3Fq%3Dvtkusers&amp;data=02%7C01%7Classo%40queensu.ca%7Cd7feebe8d20448b8984908d67113177e%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C636820724155793401&amp;sdata=o2%2FvTSRdipT81zqrnhGSo4Fz3nKScAfWaik3%2BGX5OBA%3D&amp;reserved=0

Follow this link to subscribe/unsubscribe:
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fvtk.org%2Fmailman%2Flistinfo%2Fvtkusers&amp;data=02%7C01%7Classo%40queensu.ca%7Cd7feebe8d20448b8984908d67113177e%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C636820724155793401&amp;sdata=q2Jjg6g%2B1xLDDYy52oalbiQihbyEYO2coPRXb68LVGs%3D&amp;reserved=0
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtkusers