pdfrx icon indicating copy to clipboard operation
pdfrx copied to clipboard

CMake Error to the point of not being able to successfully compile as a Windows program

Open wodel5 opened this issue 7 months ago • 3 comments

Dear developer, after adding "pdfrx: ^1.1.29" to my project, I am unable to compile it into a Windows program, with the error message: Flutter assets will be downloaded from https://storage.flutter-io.cn. Make sure you trust this source! Launching lib\main.dart on Windows in debug mode... Building Windows application... CMake Error at flutter/ephemeral/.plugin_symlinks/pdfrx/windows/CMakeLists.txt:59 (file): file COPY cannot find "E:/Flutter_Project/acpdf/build/windows/x64/pdfium/chromium%2F6555/bin/pdfium.dll": No error.

CMake Error at flutter/ephemeral/.plugin_symlinks/pdfrx/windows/CMakeLists.txt:64 (file): file COPY cannot find "E:/Flutter_Project/acpdf/build/windows/x64/pdfium/chromium%2F6555/include": No error.

Error: Unable to generate build files

Please help me, thank you very much!

wodel5 avatar May 23 '25 07:05 wodel5

pdfrx uses a binary distribution of pdfium from bblanchon/pdfium-binaries and it doesn't seem to be downloadable (at least, by the current script) from China.

The download is initiated by the code and in the current version, it checks the downloaded tgz file on the following location: [PROJECT_DIR]\build\windows\x64\pdfium\chromium%2F6555\pdfium-win-x64.tgz

In your case, it is E:\Flutter_Project\acpdf\build\windows\x64\pdfium\chromium%2F6555\pdfium-win-x64.tgz.

So, please do the following steps:

  • Download the binary from https://github.com/bblanchon/pdfium-binaries/releases/download/chromium%2F6555/pdfium-win-x64.tgz
  • Place it on E:\Flutter_Project\acpdf\build\windows\x64\pdfium\chromium%2F6555
  • Build windows binary (i.e. flutter build windows)

espresso3389 avatar May 23 '25 08:05 espresso3389

Related: #173

espresso3389 avatar May 23 '25 08:05 espresso3389

My question is, is it easy to access GitHub repositories in China?

Do you use some mirror site or such for GitHub access? If so, please explain more about how to access GitHub. If I can understand your situation correctly, I can help you in some way...

espresso3389 avatar May 23 '25 08:05 espresso3389