Menu

Barcode in windows

polpol
2023-02-28
2023-02-28
  • polpol

    polpol - 2023-02-28

    I have succesfully run qtRPT report with barcode in linux, both as library and with static linking.
    For win it crashes the program no matter if I add RPT as static or dynamic library.
    I tried both approaches - compiling the code under windows and usinc MXE cross compiling under linux.
    Both solutions fail.
    It seams like the zint library loads fine beause if I delete the dll windows complains on program startup.

     
  • polpol

    polpol - 2023-02-28

    one more lessons - in case somebody has simillar problem.
    Even though I selecter QtRPT to be compiled as library it seames it's liked statically . The reason for windows version crashing was the qtrpt.dll file. WHen I deleted that it no longer crashes.
    Still the crosscompiled qtzint.dll is there but no barcode on the preview

     
  • polpol

    polpol - 2023-02-28

    Further updates. with dynamically linked Qt and compilation inside Windows all works ok.
    Somehow the crosscompiled (MXE) library - qtZint.dll is crashing the whole app on loading in windows.

    When I run the program under wine I can find some trace
    I added some debug messages in BarCode::BarCode
    and I can see them after trying to generate the report
    "BARCODE constructed
    qtzint loaded"

    but then I get
    QGuiApplication::font(): no QGuiApplication instance and no application font set.
    and a crash
    The error happens in BarCode::drawBarcode
    at
    bc->render(*painter,QRectF(x,y,width,height), Zint::QZint::KeepAspectRatio);

     

    Last edit: polpol 2023-02-28

Log in to post a comment.