Closed Caesar454905970 closed 1 month ago
I used your method to compile and got an error
That's a linker error that is saying Visual Studio can't find "turbojpeg-static.lib" in vs_pdfium/pdfium_lib/pdfium/bin/x64/turbojpeg-static.lib. Verify that this file is actually there first of all.
That binary is checked into this repository and the solution is set up to link to it by having the relative path ".\pdfium\bin\x64" set in
If the file is there and Visual Studio is not finding it, I am not sure what could be causing this unless perhaps you changed the working directory?
build dll,show other error!
Well that looks like because you changed pdfium_lib to be a DLL. The render_pdf project is set up to link to a static library. It's not going to magically just work. If you want "implicitely link" to the DLL you can do so with minor changes I think. You need to find where the stub .lib file for pdfium_lib is being created and change render_pdf's "additional library directories" such that it finds it. Doing that should get render_pdf building again but then to actually run it the DLL will need to be in the same directory as the executable. You either copy it there or set up the PATH environment variable to that the exe loader finds it.
The solution is set up to build to a static library. If you want to build to a DLL you need to change settings in Visual Studio. There are two toplevel projects in the solution, pdfium_lib and render_pdf. In Solution Explorer, right click on pdfium_lib and select "properties" then "Configuration Properties > General" change "Configuration Type" to "Dynamic Library (.DLL)" in the debug and release x64 configurations.