fork download
  1. #include <iostream>
  2. #include "hpdf.h"
  3. using namespace std;
  4.  
  5. void error_handler(HPDF_STATUS error_no, HPDF_STATUS detail_no, void* user_data)
  6. {
  7. printf("ERROR: error_no=%04X, detail_no=%d\n",
  8. (unsigned int)error_no, (int)detail_no);
  9. throw std::exception(); /* throw exception on error */
  10. }
  11. int main()
  12. {
  13. HPDF_Doc pdf = HPDF_New(error_handler, NULL); /* set error-handler */
  14. if (!pdf) {
  15. printf("error: cannot create PdfDoc object\n");
  16. return 1;
  17. }
  18.  
  19.  
  20. HPDF_Free(pdf);
  21. return 0;
  22. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:2:10: fatal error: hpdf.h: No such file or directory
 #include "hpdf.h"
          ^~~~~~~~
compilation terminated.
stdout
Standard output is empty