Skip to content
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

Problem compile with QT 5.12.0 Mingw 32 Windows 10 #32

Open
amrkamal2025 opened this issue Jan 10, 2019 · 2 comments
Open

Problem compile with QT 5.12.0 Mingw 32 Windows 10 #32

amrkamal2025 opened this issue Jan 10, 2019 · 2 comments

Comments

@amrkamal2025
Copy link

amrkamal2025 commented Jan 10, 2019

Hello,

I tried to compile the library using QT 5.12.0 with Mingw32 compiler I followed this steps

1 - I open the qtpdfium.pro in release mode and I downloaded the PDFIUM third-party library and add it's content to the folder

2 - I compiled and I got this error
so what the problem I did to not compile so I can fix it?

D:\build\qtpdfium-master\src\3rdparty\pdfium\fpdfsdk\fsdk_actionhandler.cpp:425: error: 'class CPDF_Dest' has no member named 'GetObjectW'; did you mean 'GetObject'? const CPDF_Array* pMyArray = ToArray(MyDest.GetObject()); ^ D:\build\qtpdfium-master\src\3rdparty\pdfium\fpdfsdk\fpdfview.cpp:447: error: 'g_pdfium_print_postscript_level' was not declared in this scope g_pdfium_print_postscript_level = postscript_level; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ D:\build\qtpdfium-master\src\3rdparty\pdfium\fpdfsdk\fsdk_actionhandler.cpp:425: error: 'class CPDF_Dest' has no member named 'GetObjectW'; did you mean 'GetObject'? const CPDF_Array* pMyArray = ToArray(MyDest.GetObject()); ^ D:\build\qtpdfium-master\src\3rdparty\pdfium\fpdfsdk\fpdfview.cpp:681: error: no matching function for call to 'MakeUnique<<expression error> >(HDC__*&)' pContext->m_pDevice = pdfium::MakeUnique<CFX_WindowsDevice>(dc); ^ D:\build\qtpdfium-master\src\3rdparty\pdfium\fpdfsdk\fpdfview.cpp:681: error: template argument 1 is invalid pContext->m_pDevice = pdfium::MakeUnique<CFX_WindowsDevice>(dc); ^ D:\build\qtpdfium-master\src\3rdparty\pdfium\fpdfsdk\fpdfview.cpp:681: error: template argument 1 is invalid pContext->m_pDevice = pdfium::MakeUnique<CFX_WindowsDevice>(dc); ^ D:\build\qtpdfium-master\src\3rdparty\pdfium\fpdfsdk\fpdfview.cpp:681: error: template argument 1 is invalid pContext->m_pDevice = pdfium::MakeUnique<CFX_WindowsDevice>(dc); ^ D:\build\qtpdfium-master\src\3rdparty\pdfium\fpdfsdk\fpdfview.cpp:688: error: 'CFX_WindowsDevice' was not declared in this scope CFX_WindowsDevice WinDC(dc); ^~~~~~~~~~~~~~~~~ D:\build\qtpdfium-master\src\3rdparty\pdfium\fpdfsdk\fpdfview.cpp:689: error: 'WinDC' was not declared in this scope if (WinDC.GetDeviceCaps(FXDC_DEVICE_CLASS) == FXDC_PRINTER) { ^~~~~ D:\build\qtpdfium-master\src\3rdparty\pdfium\fpdfsdk\fpdfview.cpp:447: error: 'g_pdfium_print_postscript_level' was not declared in this scope g_pdfium_print_postscript_level = postscript_level; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ D:\build\qtpdfium-master\src\3rdparty\pdfium\fpdfsdk\fpdfview.cpp:681: error: 'CFX_WindowsDevice' was not declared in this scope pContext->m_pDevice = pdfium::MakeUnique<CFX_WindowsDevice>(dc); ^~~~~~~~~~~~~~~~~ D:\build\qtpdfium-master\src\3rdparty\pdfium\fpdfsdk\fpdfview.cpp:681: error: no matching function for call to 'MakeUnique<<expression error> >(HDC__*&)' pContext->m_pDevice = pdfium::MakeUnique<CFX_WindowsDevice>(dc); ^ D:\build\qtpdfium-master\src\3rdparty\pdfium\fpdfsdk\fpdfview.cpp:681: error: template argument 1 is invalid pContext->m_pDevice = pdfium::MakeUnique<CFX_WindowsDevice>(dc); ^ D:\build\qtpdfium-master\src\3rdparty\pdfium\fpdfsdk\fpdfview.cpp:681: error: template argument 1 is invalid pContext->m_pDevice = pdfium::MakeUnique<CFX_WindowsDevice>(dc); ^ D:\build\qtpdfium-master\src\3rdparty\pdfium\fpdfsdk\fpdfview.cpp:681: error: template argument 1 is invalid pContext->m_pDevice = pdfium::MakeUnique<CFX_WindowsDevice>(dc); ^ D:\build\qtpdfium-master\src\3rdparty\pdfium\fpdfsdk\fpdfview.cpp:688: error: 'CFX_WindowsDevice' was not declared in this scope CFX_WindowsDevice WinDC(dc); ^~~~~~~~~~~~~~~~~ D:\build\qtpdfium-master\src\3rdparty\pdfium\fpdfsdk\fpdfview.cpp:689: error: 'WinDC' was not declared in this scope if (WinDC.GetDeviceCaps(FXDC_DEVICE_CLASS) == FXDC_PRINTER) { ^~~~~

@Arsakes
Copy link

Arsakes commented Feb 23, 2019

I have the same bug.

It seems that part of the code that isn't supposed to be compiled is being compiled.
There's a define FXM_PLATFORM which by default has QT value, it happens to govern if file containing CFX_WindowsDevice definition is included.
However this only happens if FXM_PLATFORM equal to FXM_PLATFORM_WINDOWS which is not the case by default.

Question to author? What should be the value of FXM_PLATFORM on WIndows 10?????

@xinsuinizhuan
Copy link

Do you have solved this preblem, i also have the same bug?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants