Project

General

Profile

Bug #5256

Linking errors with Pre-built binaries for Visual Studio

Added by Barış Meriç almost 6 years ago.

Status:
New
Priority:
Normal
Assignee:
Target version:
Start date:
09/09/2016
Due date:
% Done:

0%

Estimated time:

Description

Using pre-built libraries for Html->Pdf causes linker errors with Installing_Wt_on_MS_Windows.

Bug reproducible with;

  • Wt-3.3.5 and Wt-3.3.6 on Visual Studio 2013 or Wt-3.3.6 on Visual Studio 2015
  • HPDF_DLL defined
  • Linking libhpdfd.lib, wtd.lib, wthttpd.lib, wtdbod.lib, wtisapid.lib, wttestd.lib in Debug Build

<!-- -->

#include <hpdf.h>
#include <Wt/Render/WPdfRenderer>

namespace {
    void __stdcall error_handler(HPDF_STATUS error_no, HPDF_STATUS detail_no,
        void *user_data) {
        fprintf(stderr, "libharu error: error_no=%04X, detail_no=%d\n",
            (unsigned int)error_no, (int)detail_no);
    }
}
using namespace Wt;

int  main() {
    HPDF_Doc pdf = HPDF_New(error_handler, 0);

    HPDF_Page page = HPDF_AddPage(pdf);
    HPDF_Page_SetSize(page, HPDF_PAGE_SIZE_A4, HPDF_PAGE_PORTRAIT);
    Render::WPdfRenderer renderer(pdf, page);
    renderer.setMargin(2.54);
    renderer.setDpi(96);
    renderer.render("<p style=\"background-color: #c11\">Hello, world !</p>");
    HPDF_SaveToFile(pdf, "hello.pdf");
    HPDF_Free(pdf);
}

Files

errors.txt (1.42 KB) errors.txt Barış Meriç, 09/09/2016 05:46 PM

No data to display

Also available in: Atom PDF