Cannot build the development branch on Windows 10
I'm trying to build the latest development branch state (commit 3586145a3496d0a19b6e3d25bf3bca46e5363952), since I would really like to use some of the features introduced after the alpha release from September 2024.
I'm using Visual Studio 2019 and Qt 6 as written in the readme. I've tried Qt 6.7.3, 6.8.3 and 6.9, with the same results. Every time, qmake fails with the following output:
qmake -tp vc "DEFINES+=NON_PORTABLE" "CONFIG+=release" pdf_viewer_build_config.pro Info: creating stash file C:\code\Sioyek.qmake.stash WARNING: Unable to generate output for: C:/code/Sioyek/Makefile.Release [TEMPLATE vcapp] WARNING: Unable to generate output for: C:/code/Sioyek/Makefile.Debug [TEMPLATE vcapp]
msbuild -maxcpucount sioyek.vcxproj /m /property:Configuration=Release Microsoft (R) Build Engine version 16.11.2+f32259642 for .NET Framework Copyright (C) Microsoft Corporation. All rights reserved.
MSBUILD : error MSB1009: Project file does not exist. Switch: sioyek.vcxproj
I have not tested on VS2019 but it should work. Are you sure you are using the developer command prompt?
Thank you for the quick answer!
I'm using VS2019 because that's what is mentioned in the Readme, and the project seems to be configured for v142 Build tools. I have also tried VS2022 with VS2019 Build Tools, with the same results. Which version have you tested?
Yes, I am using the developer command prompt.
I have tested with visual studio 2022 and qt 6.8.
Interesting. Did you use VS2019 build tools, or did you reconfigure the project to use newer ones?
Also, are you sure I'm supposed to be using the developer command prompt and not powershell? build_windows.bat has several "cp" commands in it, which don't work by default in the Windows command prompt.
I guess you need developer powershell command prompt, but that is irrelevant, the issue seems to be happening before we get to the cp commands. You can try running the commands manually one by one and see if they are working. For example after running the qmake command does it generate a vcxproj file?
The qmake command doesn't generate the sioyek.vcxproj file, so far as I can see. I'm guessing that this is somehow linked to the "Unable to generate output" warnings. I also tried running this command with a -d flag, but I can't find any other errors in the verbose output. Do you know how I can debug this?
What is the output of qmake --version?
C:\code\Sioyek>qmake --version QMake version 3.1 Using Qt version 6.7.3 in C:/Qt/6.7.3/mingw_64/lib
You are using the mingw version of qt for some reason, you should be using the msvc version.
Thank you! I fixed the qmake path and now sioyek.vcxproj is generated. Unfortunately, there is another error in the next msbuild command, with the following output.
I tried switching to VS 2022 and Qt 6.8, but it is the same. Do you know how I could fix this?
Alternatively, would you consider making another alpha release with the recent changes?
ResourceCompile:
C:\Program Files (x86)\Windows Kits\10\bin\10.0.20348.0\x86\rc.exe /D _WINDOWS /D UNICODE /D _UNICODE /D WIN32 /D _ENABLE_EXTENDED_ALIGNED_STORAGE /D NON_PORTABLE /D SIOYEK_QT6 /D QT_3DINPUT_LIB /D QT_OPENGL_LIB /D QT_OPENGLEXTENSIONS_LIB /D QT_WIDGETS_LIB /D _CRT_SECURE_NO_WARNINGS /D _CRT_NONSTDC_NO_DEPRECATE /D N
OMINMAX /D NDEBUG /D QT_NO_DEBUG /D QT_QUICKWIDGETS_LIB /D QT_QUICK_LIB /D QT_OPENGLWIDGETS_LIB /D QT_OPENGL_LIB /D QT_WIDGETS_LIB /D QT_3DINPUT_LIB /D QT_3DCORE_LIB /D QT_SVG_LIB /D QT_TEXTTOSPEECH_LIB /D QT_MULTIMEDIA_LIB /D QT_GUI_LIB /D QT_QMLMETA_LIB /D QT_QMLMODELS_LIB /D QT_QMLWORKERSCRIPT_LIB /D QT_QML_LIB /
D QT_NETWORK_LIB /D QT_CONCURRENT_LIB /D QT_QMLINTEGRATION_LIB /D QT_CORE_LIB /l"0x0409" /nologo /fo"release\sioyek_resource.res" C:\code\sioyek\sioyek_resource.rc
Link:
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.43.34808\bin\HostX86\x86\link.exe /ERRORREPORT:QUEUE /OUT:"release\\sioyek.exe" /VERSION:"2.0" /INCREMENTAL:NO /NOLOGO /LIBPATH:mupdf\platform\win32\x64\Release /LIBPATH:zlib libmupdf.lib zlib\zlib.lib opengl32.lib C:\Qt\6.8.3\msvc2022_64\lib\Q
t6QuickWidgets.lib C:\Qt\6.8.3\msvc2022_64\lib\Qt6Quick.lib C:\Qt\6.8.3\msvc2022_64\lib\Qt6OpenGLWidgets.lib C:\Qt\6.8.3\msvc2022_64\lib\Qt6OpenGL.lib C:\Qt\6.8.3\msvc2022_64\lib\Qt6Widgets.lib C:\Qt\6.8.3\msvc2022_64\lib\Qt63DInput.lib C:\Qt\6.8.3\msvc2022_64\lib\Qt63DCore.lib C:\Qt\6.8.3\msvc2022_64\lib\Qt6Svg.lib
C:\Qt\6.8.3\msvc2022_64\lib\Qt6TextToSpeech.lib C:\Qt\6.8.3\msvc2022_64\lib\Qt6Multimedia.lib C:\Qt\6.8.3\msvc2022_64\lib\Qt6Gui.lib C:\Qt\6.8.3\msvc2022_64\lib\Qt6QmlMeta.lib C:\Qt\6.8.3\msvc2022_64\lib\Qt6QmlModels.lib C:\Qt\6.8.3\msvc2022_64\lib\Qt6QmlWorkerScript.lib C:\Qt\6.8.3\msvc2022_64\lib\Qt6Qml.lib C:\Qt
\6.8.3\msvc2022_64\lib\Qt6Network.lib C:\Qt\6.8.3\msvc2022_64\lib\Qt6Concurrent.lib C:\Qt\6.8.3\msvc2022_64\lib\Qt6Core.lib C:\Qt\6.8.3\msvc2022_64\lib\Qt6EntryPoint.lib shell32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp3
2.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /PDB:"release\sioyek.pdb" /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF /TLBID:1 /DYNAMICBASE /NXCOMPAT /MACHINE:X86 /SAFESEH "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b6414
4ccf1df' language='*' processorArchitecture='*'" release\sioyek_resource.res
release\OpenWithApplication.obj
release\RunGuard.obj
release\TouchAudioButtons.obj
release\TouchCheckbox.obj
release\TouchConfigMenu.obj
release\TouchCopyOptions.obj
release\TouchDeleteButton.obj
release\TouchDrawControls.obj
release\TouchGenericButtons.obj
release\TouchHighlightButtons.obj
release\TouchListView.obj
release\TouchMacroEditor.obj
release\TouchMainMenu.obj
release\TouchMarkSelector.obj
release\TouchPageSelector.obj
release\TouchRangeSelectUI.obj
release\TouchRectangleSelectUI.obj
release\TouchSearchButtons.obj
release\TouchSettings.obj
release\TouchSlider.obj
release\TouchTextEdit.obj
release\book.obj
release\checksum.obj
release\config.obj
release\coordinates.obj
release\database.obj
release\document.obj
release\document_view.obj
release\fzf.obj
release\input.obj
release\main.obj
release\main_widget.obj
release\mysortfilterproxymodel.obj
release\new_file_checker.obj
release\path.obj
release\pdf_renderer.obj
release\pdf_view_opengl_widget.obj
release\sqlite3.obj
release\synctex_parser.obj
release\synctex_parser_utils.obj
release\ui.obj
release\utils.obj
release\moc_OpenWithApplication.obj
release\moc_RunGuard.obj
release\moc_TouchAudioButtons.obj
release\moc_TouchCheckbox.obj
release\moc_TouchConfigMenu.obj
release\moc_TouchCopyOptions.obj
release\moc_TouchDeleteButton.obj
release\moc_TouchDrawControls.obj
release\moc_TouchGenericButtons.obj
release\moc_TouchHighlightButtons.obj
release\moc_TouchListView.obj
release\moc_TouchMacroEditor.obj
release\moc_TouchMainMenu.obj
release\moc_TouchMarkSelector.obj
release\moc_TouchPageSelector.obj
release\moc_TouchRangeSelectUI.obj
release\moc_TouchRectangleSelectUI.obj
release\moc_TouchSearchButtons.obj
release\moc_TouchSettings.obj
release\moc_TouchSlider.obj
release\moc_TouchTextEdit.obj
release\moc_main_widget.obj
release\moc_mysortfilterproxymodel.obj
release\moc_pdf_renderer.obj
release\moc_ui.obj
release\qrc_resources.obj
1>LINK : fatal error LNK1181: cannot open input file 'libmupdf.lib' [C:\code\sioyek\sioyek.vcxproj]
1>Done Building Project "C:\code\sioyek\sioyek.vcxproj" (default targets) -- FAILED.
Is there a libmupdf.lib file in mupdf\platform\win32\x64\Release? If not, is there a libmupdf.lib anywhere else within the mupdf directory?
Yes, there is. It's being generated during the previous msbuild commands, seemingly without any issues.
If I update the repository to the last commit, I get a different error:
1>C:\code\sioyek\pdf_viewer\main_widget.cpp(8255,1): error C4716: 'MainWidget::goto_ith_next_tab': must return a value [C:\code\sioyek\sioyek.vcxproj]
I think this error simply happens earlier than the previous one, though.
Oops. The goto_ith_next_tab should be fixed in the latest commits now.
Can confirm the fix, now I'm back to the same error again.
There seems to be a general issue with the linker. If I open the .vcxproj file and manually add the full path to libmupdf.lib, this error goes away, but I get 5106 new ones. Here are the several last lines of the output.
By the way, I really appreciate you taking the time to help. Also, thank you for the software itself, it is fantastic!
moc_TouchAudioButtons.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual int __thiscall QWidget::qt_metacall(enum QMetaObject::Call,int,void * *)" (__imp_?qt_metacall@QWidget@@UAEHW4Call@QMetaObject@@HPAPAX@Z) [C:\code\sioyek\sioyek.vcxproj]
moc_TouchCheckbox.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual int __thiscall QWidget::qt_metacall(enum QMetaObject::Call,int,void * *)" (__imp_?qt_metacall@QWidget@@UAEHW4Call@QMetaObject@@HPAPAX@Z) [C:\code\sioyek\sioyek.vcxproj]
moc_TouchConfigMenu.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual int __thiscall QWidget::qt_metacall(enum QMetaObject::Call,int,void * *)" (__imp_?qt_metacall@QWidget@@UAEHW4Call@QMetaObject@@HPAPAX@Z) [C:\code\sioyek\sioyek.vcxproj]
moc_TouchCopyOptions.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual int __thiscall QWidget::qt_metacall(enum QMetaObject::Call,int,void * *)" (__imp_?qt_metacall@QWidget@@UAEHW4Call@QMetaObject@@HPAPAX@Z) [C:\code\sioyek\sioyek.vcxproj]
moc_TouchMacroEditor.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class QDebug & __thiscall QDebug::operator<<(class QBasicUtf8StringView<0>)" (__imp_??6QDebug@@QAEAAV0@V?$QBasicUtf8StringView@$0A@@@@Z) [C:\code\sioyek\sioyek.vcxproj]
moc_main_widget.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static struct QMetaObject const QMainWindow::staticMetaObject" (__imp_?staticMetaObject@QMainWindow@@2UQMetaObject@@B) [C:\code\sioyek\sioyek.vcxproj]
moc_main_widget.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual void * __thiscall QMainWindow::qt_metacast(char const *)" (__imp_?qt_metacast@QMainWindow@@UAEPAXPBD@Z) [C:\code\sioyek\sioyek.vcxproj]
moc_main_widget.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual int __thiscall QMainWindow::qt_metacall(enum QMetaObject::Call,int,void * *)" (__imp_?qt_metacall@QMainWindow@@UAEHW4Call@QMetaObject@@HPAPAX@Z) [C:\code\sioyek\sioyek.vcxproj]
moc_mysortfilterproxymodel.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static struct QMetaObject const QSortFilterProxyModel::staticMetaObject" (__imp_?staticMetaObject@QSortFilterProxyModel@@2UQMetaObject@@B) [C:\code\sioyek\sioyek.vcxproj]
moc_mysortfilterproxymodel.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual void * __thiscall QSortFilterProxyModel::qt_metacast(char const *)" (__imp_?qt_metacast@QSortFilterProxyModel@@UAEPAXPBD@Z) [C:\code\sioyek\sioyek.vcxproj]
moc_mysortfilterproxymodel.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual int __thiscall QSortFilterProxyModel::qt_metacall(enum QMetaObject::Call,int,void * *)" (__imp_?qt_metacall@QSortFilterProxyModel@@UAEHW4Call@QMetaObject@@HPAPAX@Z)
[C:\code\sioyek\sioyek.vcxproj]
moc_ui.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual void * __thiscall QLineEdit::qt_metacast(char const *)" (__imp_?qt_metacast@QLineEdit@@UAEPAXPBD@Z) [C:\code\sioyek\sioyek.vcxproj]
moc_ui.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual int __thiscall QLineEdit::qt_metacall(enum QMetaObject::Call,int,void * *)" (__imp_?qt_metacall@QLineEdit@@UAEHW4Call@QMetaObject@@HPAPAX@Z) [C:\code\sioyek\sioyek.vcxproj]
qrc_resources.obj : error LNK2001: unresolved external symbol "bool __cdecl qRegisterResourceData(int,unsigned char const *,unsigned char const *,unsigned char const *)" (?qRegisterResourceData@@YA_NHPBE00@Z) [C:\code\sioyek\sioyek.vcxproj]
qrc_resources.obj : error LNK2001: unresolved external symbol "bool __cdecl qUnregisterResourceData(int,unsigned char const *,unsigned char const *,unsigned char const *)" (?qUnregisterResourceData@@YA_NHPBE00@Z) [C:\code\sioyek\sioyek.vcxproj]
qrc_resources.obj : error LNK2001: unresolved external symbol "unsigned char __cdecl qResourceFeatureZlib(void)" (?qResourceFeatureZlib@@YAEXZ) [C:\code\sioyek\sioyek.vcxproj]
MSVCRT.lib(exe_winmain.obj) : error LNK2001: unresolved external symbol _WinMain@16 [C:\code\sioyek\sioyek.vcxproj]
release\\sioyek.exe : fatal error LNK1120: 1474 unresolved externals [C:\code\sioyek\sioyek.vcxproj]
0 Warning(s)
5106 Error(s)
Hmmm I am out of ideas. It is strange that it complains about libmupdf.lib while it exists. Maybe there is a permission issue due to it being in drive C (this is a shot in the dark though)?
Moving the repository to my home directory, unfortunately, did not make a difference.
Would you consider doing another alpha release, or even just simply sharing a current build?
Here is my build of the development branch: https://limewire.com/d/eTeca#u1SBeXyRFs .
Thank you! It works. I'll try out some things that didn't work for me in the alpha release.