Greets - resurrecting this a bit; I'm looking for a CPP reference script (instantiate class, unlock api) for QuickPDF; the VS scripts are not GNU CPP, so are not actually that useful to getting GNU CPP going.
The platform target is Debian 9, GCC 6.3 (preferably, but not mandatory) and the library from FoxitQPLLinuxCPP1711.
I have a non-working snippet as my baseline, drawn from various cobbled sources:
#include "Import/CPlusPlus/FoxitQPLLinuxCPP1711.h" #include "Import/CPlusPlus/FoxitQPLLinuxCPP1711.cpp" wstring pdfkey = "12345"; wstring mymsg = "Loading result of key "; FoxitQPLLinuxCPP1711 qp = new FoxitQPLLinuxCPP1711(); int result = qp.UnlockKey(pdfkey); wcout << mymsg << pdfkey << " ---- " << result << endl;
However, it is expecting, I believe, a specifically typed filename in the instantiation call based upon the errors:
testy.cpp:16:54: error: no matching function for call to ‘FoxitQPLLinuxCPP1711::FoxitQPLLinuxCPP1711()’ FoxitQPLLinuxCPP1711 qp = new FoxitQPLLinuxCPP1711(); ^ In file included from testy.cpp:7:0: Import/CPlusPlus/FoxitQPLLinuxCPP1711.cpp:30:1: note: candidate: FoxitQPLLinuxCPP1711::FoxitQPLLinuxCPP1711(const wstring&) FoxitQPLLinuxCPP1711::FoxitQPLLinuxCPP1711(const std::wstring& LinuxFileName) ^~~~~~~~~~~~~~~~~~~~ Import/CPlusPlus/FoxitQPLLinuxCPP1711.cpp:30:1: note: candidate expects 1 argument, 0 provided In file included from testy.cpp:6:0: Import/CPlusPlus/FoxitQPLLinuxCPP1711.h:174:7: note: candidate: constexpr FoxitQPLLinuxCPP1711::FoxitQPLLinuxCPP1711(const FoxitQPLLinuxCPP1711&) class FoxitQPLLinuxCPP1711 ^~~~~~~~~~~~~~~~~~~~ Import/CPlusPlus/FoxitQPLLinuxCPP1711.h:174:7: note: candidate expects 1 argument, 0 provided
I'm not a stellar cpp/c# programmer, but have a pretty good idea where the semi-colons go. I am currently writing code as baseline using 3 different pdf generation libraries, across both c++ and php, and this is the only library I have yet to get to work right out of the box. A console-based reference script would be appreciated if available! Thanks! TH.
|