-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build issues on Windows and Linux #15
Comments
I just reported a compilation issue when using MSVC++ under windows. Current master does not compile under windows so far. Could you try an older revision, |
I've just tried to compile using the revision you indicated and qmake complains about missing files. |
Did you also update the submodule ? It should build fine, or at least not complain about missing files… |
You're right, after updating the submodule the error message about missing files disappears, but I get a compile error, first error line shown bellow: ./3rdparty/pdfium/core/src/fxcrt/../../include/fxcrt/fx_system.h:126:25: error: expected unqualified-id before 'void' After I edit the header file fx_system.h in order to fix this error I get a 2nd error message, which is the same that I get when I try to compile QtPdf module (https://github.com/qt-labs/qtpdf): ../3rdparty/pdfium/core/src/fxcrt/fx_basic_util.cpp:172:21: error: 'Printf_format_string' has not been declared |
Hey! @iondevsrl @pinaraf I don't have a Windows nor Linux machine at the moment, so I can only test on Mac/iOS/Android. I will try to setup an old notebook to fix this. But PRs are also greatly appreciated! |
I don't have any issue building on Linux with G++ 6.3.0 / Qt 5.7. But I will have to target Windows users and I must use MSVC++, so I can help cover these two targets. |
As explained in my initial post, the fix for gcc 5.4 on Linux is very simple. The error message is: /src/pdfium/qpdfium.h:52:36: error: ‘>>’ should be ‘> >’ within a nested template argument list Therefore all you have to do is add a space character. On Windows I can only use MinGW and I can also help with builds and testing for this compiler. By the way, would you be interested in having QtPdfium work with Qt4? |
'>>' vs '> >' is a classical C++ gotcha related to C++11/14. I think the code is missing a |
@iondevsrl did you succeed on building on Windows? I tried this project two years ago on Windows and OS X, and submitted the first issue. It's all good then. |
Hi @coooooooorey, unfortunately, I don't have a Windows machine anymore, so it is hard to me to test on Windows. Can you send me the error message? |
I think it's the Marco issue. It's looking for some Linux headers on windows |
It seems like some functions on windows didn't implement |
Hi coooooooorey,
Produced hundreds of warning, but no errors. All libs are placed in the output path. |
I managed to build it with some changes on win msys2 mingw with qt 5.9.1. @paulovap is there any chance you'll ever update the pdfium code? It seems its from 2015. |
@aquiles2k hey there. I don't have the time to update the project since I am not using it anymore, but I would welcome patches to keep it up to date. I also don't have a Windows machine, so its hard for me to make sure it is working on every platform. I would love to review your changes! |
I have same issue as you Vadixem. |
Hi,
First of all thanks for your work on QtPdfium.
I tried it on Linux and Windows and I have encountered the following issues:
/src/pdfium/qpdfium.h:52:36: error: ‘>>’ should be ‘> >’ within a nested template argument list
QVector<QWeakPointer> m_pages;
In order to fix it, you need to change the incriminated line to:
QVector<QWeakPointer > m_pages;
Could you, please, add support for the MinGW compiler?
Thanks in advance for your help and best regards,
Ion
make[3]: Entering directory '/c/qtiplot/3rdparty/qtpdfium/src/pdfium'
g++ -c -pipe -fno-keep-inline-dllexport -march=nocona -mtune=core2 -Wa,-mbig-obj -O2 -std=c++1z -Wall -Wextra -fno-exceptions -frtti -DUNICODE -D__QT__ -DOPJ_STATIC -DPNG_PREFIX -DPNG_USE_READ_MACROS -DQT_NO_VERSION_TAGGING -DQT_BUILD_PDFIUM_LIB -DQT_BUILDING_QT -D_CRT_SECURE_NO_WARNINGS -D_USE_MATH_DEFINES -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x040800 -DFT2_BUILD_LIBRARY -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -I. -IC:/msys64/mingw64/include/dbus-1.0 -IC:/msys64/mingw64/lib/dbus-1.0/include -IC:/msys64/mingw64/include/libxml2 -IC:/msys64/mingw64/include/freetype2 -IC:/msys64/mingw64/include -IC:/msys64/mingw64/include/libpng16 -IC:/msys64/mingw64/include/harfbuzz -IC:/msys64/mingw64/include/glib-2.0 -IC:/msys64/mingw64/lib/glib-2.0/include -IC:/msys64/mingw64/include -IC:/msys64/mingw64/include/mariadb -I../../include -I../../include/QtPdfium -IC:/qtiplot/3rdparty/qtpdfium/include/QtPdfium/5.5.0 -IC:/qtiplot/3rdparty/qtpdfium/include/QtPdfium/5.5.0/QtPdfium -Itmp -I../3rdparty/pdfium -I../3rdparty/pdfium/third_party/freetype/include -I../3rdparty/pdfium/third_party/freetype/include/freetype -IC:/msys64/mingw64/include/QtCore/5.6.1 -IC:/msys64/mingw64/include/QtCore/5.6.1/QtCore -IC:/msys64/mingw64/include/QtGui -IC:/msys64/mingw64/include/QtCore -I.moc/release -IC:/msys64/mingw64/share/qt5/mkspecs/win32-g++ -o .obj/release/fpdfview.o ../3rdparty/pdfium/fpdfsdk/fpdfview.cpp
In file included from ../3rdparty/pdfium/core/fpdfapi/parser/cpdf_indirect_object_holder.h:15:0,
from ../3rdparty/pdfium/core/fpdfapi/parser/cpdf_array.h:16,
from ../3rdparty/pdfium/fpdfsdk/fpdfview.cpp:15:
../3rdparty/pdfium/core/fpdfapi/parser/cpdf_object.h:117:34: warning: unused parameter 'src' [-Wunused-parameter]
CPDF_Object(const CPDF_Object& src) {}
^
../3rdparty/pdfium/core/fpdfapi/parser/cpdf_object.h:117:34: warning: unused parameter 'src' [-Wunused-parameter]
../3rdparty/pdfium/fpdfsdk/fpdfview.cpp: In function 'FPDF_BOOL FPDF_SetPrintPostscriptLevel(int)':
../3rdparty/pdfium/fpdfsdk/fpdfview.cpp:447:3: error: 'g_pdfium_print_postscript_level' was not declared in this scope
g_pdfium_print_postscript_level = postscript_level;
^
../3rdparty/pdfium/fpdfsdk/fpdfview.cpp: In function 'void FPDF_RenderPage(HDC, FPDF_PAGE, int, int, int, int, int, int)':
../3rdparty/pdfium/fpdfsdk/fpdfview.cpp:681:46: error: 'CFX_WindowsDevice' was not declared in this scope
pContext->m_pDevice = pdfium::MakeUnique<CFX_WindowsDevice>(dc);
^
../3rdparty/pdfium/fpdfsdk/fpdfview.cpp:681:67: error: no matching function for call to 'MakeUnique(HDC__*&)'
pContext->m_pDevice = pdfium::MakeUnique<CFX_WindowsDevice>(dc);
The text was updated successfully, but these errors were encountered: