On 11/04/18, 11:54 PM, "Phil Thompson" <p...@riverbankcomputing.com> wrote:

    On 11 Apr 2018, at 12:34 pm, Alan Garny <aga...@hellix.com> wrote:
    > 
    > Hi,
    >  
    > I have modified my code to use Qt’s new signal/slot syntax, but I came 
across a problem when it comes to my QScintilla-based widget.
    >  
    > To get my code to work, I have to get a couple of QScintilla’s header 
files processed by Qt’s MOC (see here).
    
    Why? What happens if you don't?
    
Sorry, Phil, I should indeed have mentioned what happens if I don't. Basically, 
my build fails when trying to generate the DLL for my QScintilla-based widget:

[854/1032] Linking CXX shared library 
src\plugins\widget\EditorWidget\EditorWidget.dll
FAILED: src/plugins/widget/EditorWidget/EditorWidget.dll 
src/plugins/widget/EditorWidget/EditorWidget.lib
cmd.exe /C "cd . && "C:\Program Files\CMake\bin\cmake.exe" -E vs_link_dll 
--intdir=src\plugins\widget\EditorWidget\CMakeFiles\EditorWidgetPlugin.dir 
--manifests  -- C:\PROGRA~2\MICROS~3.0\VC\bin\amd64\link.exe /nologo 
src\plugins\widget\EditorWidget\CMakeFiles\EditorWidgetPlugin.dir\__\__\i18ninterface.cpp.obj
 
src\plugins\widget\EditorWidget\CMakeFiles\EditorWidgetPlugin.dir\__\__\plugininfo.cpp.obj
 
src\plugins\widget\EditorWidget\CMakeFiles\EditorWidgetPlugin.dir\src\editorlistwidget.cpp.obj
 
src\plugins\widget\EditorWidget\CMakeFiles\EditorWidgetPlugin.dir\src\editorwidget.cpp.obj
 
src\plugins\widget\EditorWidget\CMakeFiles\EditorWidgetPlugin.dir\src\editorwidgetfindreplacewidget.cpp.obj
 
src\plugins\widget\EditorWidget\CMakeFiles\EditorWidgetPlugin.dir\src\editorwidgetplugin.cpp.obj
 
src\plugins\widget\EditorWidget\CMakeFiles\EditorWidgetPlugin.dir\src\moc_editorlistwidget.cpp.obj
 
src\plugins\widget\EditorWidget\CMakeFiles\EditorWidgetPlugin.dir\src\moc_editorwidget.cpp.obj
 
src\plugins\widget\EditorWidget\CMakeFiles\EditorWidgetPlugin.dir\src\moc_editorwidgetfindreplacewidget.cpp.obj
 
src\plugins\widget\EditorWidget\CMakeFiles\EditorWidgetPlugin.dir\src\moc_editorwidgetplugin.cpp.obj
 
src\plugins\widget\EditorWidget\CMakeFiles\EditorWidgetPlugin.dir\qrc_EditorWidget_i18n.cpp.obj
 
src\plugins\widget\EditorWidget\CMakeFiles\EditorWidgetPlugin.dir\qrc_EditorWidget_ui.cpp.obj
  /out:src\plugins\widget\EditorWidget\EditorWidget.dll 
/implib:src\plugins\widget\EditorWidget\EditorWidget.lib 
/pdb:src\plugins\widget\EditorWidget\EditorWidget.pdb /dll /version:0.0 
/machine:x64 /INCREMENTAL:NO /STACK:10000000  
src\plugins\support\QScintillaSupport\QScintillaSupport.lib 
src\plugins\miscellaneous\Core\Core.lib 
C:\Qt\5.9.4\msvc2015_64\lib\Qt5Widgets.lib 
C:\Qt\5.9.4\msvc2015_64\lib\Qt5Gui.lib C:\Qt\5.9.4\msvc2015_64\lib\Qt5Xml.lib 
C:\Qt\5.9.4\msvc2015_64\lib\Qt5XmlPatterns.lib 
C:\Qt\5.9.4\msvc2015_64\lib\Qt5Network.lib 
src\plugins\thirdParty\QScintilla\QScintilla.lib 
C:\Qt\5.9.4\msvc2015_64\lib\Qt5Core.lib 
..\src\plugins\thirdParty\QScintilla\ext\release\lib\qscintilla2_qt5.lib 
kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib 
oleaut32.lib uuid.lib comdlg32.lib advapi32.lib  && cmd.exe /C "cd /D 
C:\Users\Alan\Desktop\OpenCOR\build\src\plugins\widget\EditorWidget && 
"C:\Program Files\CMake\bin\cmake.exe" -E copy 
C:/Users/Alan/Desktop/OpenCOR/build/src/plugins/widget/EditorWidget/EditorWidget.dll
 C:/Users/Alan/Desktop/OpenCOR/build/plugins/OpenCOR/EditorWidget.dll""
LINK: command "C:\PROGRA~2\MICROS~3.0\VC\bin\amd64\link.exe /nologo 
src\plugins\widget\EditorWidget\CMakeFiles\EditorWidgetPlugin.dir\__\__\i18ninterface.cpp.obj
 
src\plugins\widget\EditorWidget\CMakeFiles\EditorWidgetPlugin.dir\__\__\plugininfo.cpp.obj
 
src\plugins\widget\EditorWidget\CMakeFiles\EditorWidgetPlugin.dir\src\editorlistwidget.cpp.obj
 
src\plugins\widget\EditorWidget\CMakeFiles\EditorWidgetPlugin.dir\src\editorwidget.cpp.obj
 
src\plugins\widget\EditorWidget\CMakeFiles\EditorWidgetPlugin.dir\src\editorwidgetfindreplacewidget.cpp.obj
 
src\plugins\widget\EditorWidget\CMakeFiles\EditorWidgetPlugin.dir\src\editorwidgetplugin.cpp.obj
 
src\plugins\widget\EditorWidget\CMakeFiles\EditorWidgetPlugin.dir\src\moc_editorlistwidget.cpp.obj
 
src\plugins\widget\EditorWidget\CMakeFiles\EditorWidgetPlugin.dir\src\moc_editorwidget.cpp.obj
 
src\plugins\widget\EditorWidget\CMakeFiles\EditorWidgetPlugin.dir\src\moc_editorwidgetfindreplacewidget.cpp.obj
 
src\plugins\widget\EditorWidget\CMakeFiles\EditorWidgetPlugin.dir\src\moc_editorwidgetplugin.cpp.obj
 
src\plugins\widget\EditorWidget\CMakeFiles\EditorWidgetPlugin.dir\qrc_EditorWidget_i18n.cpp.obj
 
src\plugins\widget\EditorWidget\CMakeFiles\EditorWidgetPlugin.dir\qrc_EditorWidget_ui.cpp.obj
 /out:src\plugins\widget\EditorWidget\EditorWidget.dll 
/implib:src\plugins\widget\EditorWidget\EditorWidget.lib 
/pdb:src\plugins\widget\EditorWidget\EditorWidget.pdb /dll /version:0.0 
/machine:x64 /INCREMENTAL:NO /STACK:10000000 
src\plugins\support\QScintillaSupport\QScintillaSupport.lib 
src\plugins\miscellaneous\Core\Core.lib 
C:\Qt\5.9.4\msvc2015_64\lib\Qt5Widgets.lib 
C:\Qt\5.9.4\msvc2015_64\lib\Qt5Gui.lib C:\Qt\5.9.4\msvc2015_64\lib\Qt5Xml.lib 
C:\Qt\5.9.4\msvc2015_64\lib\Qt5XmlPatterns.lib 
C:\Qt\5.9.4\msvc2015_64\lib\Qt5Network.lib 
src\plugins\thirdParty\QScintilla\QScintilla.lib 
C:\Qt\5.9.4\msvc2015_64\lib\Qt5Core.lib 
..\src\plugins\thirdParty\QScintilla\ext\release\lib\qscintilla2_qt5.lib 
kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib 
oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST 
/MANIFESTFILE:src\plugins\widget\EditorWidget\EditorWidget.dll.manifest" failed 
(exit code 1120) with the following output:
   Creating library src\plugins\widget\EditorWidget\EditorWidget.lib and object 
src\plugins\widget\EditorWidget\EditorWidget.exp
editorwidget.cpp.obj : error LNK2019: unresolved external symbol "public: 
static struct QMetaObject const QsciScintillaBase::staticMetaObject" 
(?staticMetaObject@QsciScintillaBase@@2UQMetaObject@@B) referenced in function 
"public: static class QMetaObject::Connection __cdecl QObject::connect<void 
(__cdecl QsciScintillaBase::*)(void),void (__cdecl 
OpenCOR::EditorWidget::EditorWidget::*)(void)>(class QsciScintillaBase const 
*,void (__cdecl QsciScintillaBase::*)(void),class 
OpenCOR::EditorWidget::EditorWidget const *,void (__cdecl 
OpenCOR::EditorWidget::EditorWidget::*)(void),enum Qt::ConnectionType)" 
(??$connect@P8QsciScintillaBase@@EAAXXZP8EditorWidget@2OpenCOR@@EAAXXZ@QObject@@SA?AVConnection@QMetaObject@@PEBVQsciScintillaBase@@P83@EAAXXZPEBVEditorWidget@4OpenCOR@@P8445@EAAXXZW4ConnectionType@Qt@@@Z)
editorwidget.cpp.obj : error LNK2019: unresolved external symbol "public: 
static struct QMetaObject const QsciScintilla::staticMetaObject" 
(?staticMetaObject@QsciScintilla@@2UQMetaObject@@B) referenced in function 
"public: static class QMetaObject::Connection __cdecl QObject::connect<void 
(__cdecl QsciScintilla::*)(int,int),void (__cdecl 
OpenCOR::EditorWidget::EditorWidget::*)(int,int)>(class QsciScintilla const 
*,void (__cdecl QsciScintilla::*)(int,int),class 
OpenCOR::EditorWidget::EditorWidget const *,void (__cdecl 
OpenCOR::EditorWidget::EditorWidget::*)(int,int),enum Qt::ConnectionType)" 
(??$connect@P8QsciScintilla@@EAAXHH@ZP8EditorWidget@2OpenCOR@@EAAXHH@Z@QObject@@SA?AVConnection@QMetaObject@@PEBVQsciScintilla@@P83@EAAXHH@ZPEBVEditorWidget@4OpenCOR@@P8445@EAAXHH@ZW4ConnectionType@Qt@@@Z)
src\plugins\widget\EditorWidget\EditorWidget.dll : fatal error LNK1120: 2 
unresolved externals
[857/1032] Generating src/moc_simulationexperimentviewwidget.cpp
ninja: build stopped: subcommand failed.

Cheers, Alan. 


_______________________________________________
QScintilla mailing list
QScintilla@riverbankcomputing.com
https://www.riverbankcomputing.com/mailman/listinfo/qscintilla

Reply via email to