Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. 3rd Party Software
  4. PDFhummus error: PDFWriter.h: No such file or directory. I need help to use PDFhummus with QT Creator
Forum Updated to NodeBB v4.3 + New Features

PDFhummus error: PDFWriter.h: No such file or directory. I need help to use PDFhummus with QT Creator

Scheduled Pinned Locked Moved Unsolved 3rd Party Software
26 Posts 4 Posters 5.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #14

    Build the library properly and use it rather than trying to do it by hand like you do.

    Interested in AI ? www.idiap.ch
    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

    ronaldonR 2 Replies Last reply
    0
    • SGaistS SGaist

      Build the library properly and use it rather than trying to do it by hand like you do.

      ronaldonR Offline
      ronaldonR Offline
      ronaldon
      wrote on last edited by
      #15

      @SGaist
      How can i made that? In the begin i try compile and import the files .lib but not work for me.

      1 Reply Last reply
      0
      • SGaistS SGaist

        Build the library properly and use it rather than trying to do it by hand like you do.

        ronaldonR Offline
        ronaldonR Offline
        ronaldon
        wrote on last edited by ronaldon
        #16

        @SGaist
        I receive this error now:

        C:\Users\Usuario\Documents\QTProjects\build-TestPDFhummus-Desktop_Qt_5_15_2_MinGW_64_bit-Debug..\TestPDFhummus\main.cpp:16: error: undefined reference to PDFWriter::PDFWriter()' debug/main.o: In function qMain(int, char**)':
        C:\Users\Usuario\Documents\QTProjects\build-TestPDFhummus-Desktop_Qt_5_15_2_MinGW_64_bit-Debug/../TestPDFhummus/main.cpp:16: undefined reference to `PDFWriter::PDFWriter()'

        Now, my .pro is:

        QT       += core gui
        
        greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
        
        CONFIG += c++11
        
        # You can make your code fail to compile if it uses deprecated APIs.
        # In order to do so, uncomment the following line.
        #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
        
        SOURCES += \
            main.cpp \
            testpdfhummus.cpp
        
        HEADERS += \
            testpdfhummus.h
        
        FORMS += \
            testpdfhummus.ui
        
        unix:!macx: LIBS += -L$$PWD/./pdf_hummus/Build/PDFWriter/ -lPDFWriter
        
        INCLUDEPATH += $$PWD/./pdf_hummus/PDFWriter
        DEPENDPATH += $$PWD/./pdf_hummus/PDFWriter
        
        unix:!macx: PRE_TARGETDEPS += $$PWD/./pdf_hummus/Build/PDFWriter/libPDFWriter.a
        
        unix:!macx: LIBS += -L$$PWD/./pdf_hummus/Build/FreeType/ -lFreeType
        
        INCLUDEPATH += $$PWD/./pdf_hummus/FreeType/include
        DEPENDPATH += $$PWD/./pdf_hummus/FreeType/include
        
        unix:!macx: PRE_TARGETDEPS += $$PWD/./pdf_hummus/Build/FreeType/libFreeType.a
        
        unix:!macx: LIBS += -L$$PWD/./pdf_hummus/Build/LibJpeg/ -lLibJpeg
        
        INCLUDEPATH += $$PWD/./pdf_hummus/LibJpeg
        DEPENDPATH += $$PWD/./pdf_hummus/LibJpeg
        
        unix:!macx: PRE_TARGETDEPS += $$PWD/./pdf_hummus/Build/LibJpeg/libLibJpeg.a
        
        unix:!macx: LIBS += -L$$PWD/./pdf_hummus/Build/LibTiff/ -lLibTiff
        
        INCLUDEPATH += $$PWD/./pdf_hummus/LibTiff
        DEPENDPATH += $$PWD/./pdf_hummus/LibTiff
        
        unix:!macx: PRE_TARGETDEPS += $$PWD/./pdf_hummus/Build/LibTiff/libLibTiff.a
        
        unix:!macx: LIBS += -L$$PWD/./pdf_hummus/Build/ZLib/ -lZlib
        
        INCLUDEPATH += $$PWD/./pdf_hummus/ZLib
        DEPENDPATH += $$PWD/./pdf_hummus/ZLib
        
        unix:!macx: PRE_TARGETDEPS += $$PWD/./pdf_hummus/Build/ZLib/libZlib.a
        
        # Default rules for deployment.
        qnx: target.path = /tmp/$${TARGET}/bin
        else: unix:!android: target.path = /opt/$${TARGET}/bin
        !isEmpty(target.path): INSTALLS += target
        
        DISTFILES += \
        
        JonBJ 1 Reply Last reply
        0
        • ronaldonR ronaldon

          @SGaist
          I receive this error now:

          C:\Users\Usuario\Documents\QTProjects\build-TestPDFhummus-Desktop_Qt_5_15_2_MinGW_64_bit-Debug..\TestPDFhummus\main.cpp:16: error: undefined reference to PDFWriter::PDFWriter()' debug/main.o: In function qMain(int, char**)':
          C:\Users\Usuario\Documents\QTProjects\build-TestPDFhummus-Desktop_Qt_5_15_2_MinGW_64_bit-Debug/../TestPDFhummus/main.cpp:16: undefined reference to `PDFWriter::PDFWriter()'

          Now, my .pro is:

          QT       += core gui
          
          greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
          
          CONFIG += c++11
          
          # You can make your code fail to compile if it uses deprecated APIs.
          # In order to do so, uncomment the following line.
          #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
          
          SOURCES += \
              main.cpp \
              testpdfhummus.cpp
          
          HEADERS += \
              testpdfhummus.h
          
          FORMS += \
              testpdfhummus.ui
          
          unix:!macx: LIBS += -L$$PWD/./pdf_hummus/Build/PDFWriter/ -lPDFWriter
          
          INCLUDEPATH += $$PWD/./pdf_hummus/PDFWriter
          DEPENDPATH += $$PWD/./pdf_hummus/PDFWriter
          
          unix:!macx: PRE_TARGETDEPS += $$PWD/./pdf_hummus/Build/PDFWriter/libPDFWriter.a
          
          unix:!macx: LIBS += -L$$PWD/./pdf_hummus/Build/FreeType/ -lFreeType
          
          INCLUDEPATH += $$PWD/./pdf_hummus/FreeType/include
          DEPENDPATH += $$PWD/./pdf_hummus/FreeType/include
          
          unix:!macx: PRE_TARGETDEPS += $$PWD/./pdf_hummus/Build/FreeType/libFreeType.a
          
          unix:!macx: LIBS += -L$$PWD/./pdf_hummus/Build/LibJpeg/ -lLibJpeg
          
          INCLUDEPATH += $$PWD/./pdf_hummus/LibJpeg
          DEPENDPATH += $$PWD/./pdf_hummus/LibJpeg
          
          unix:!macx: PRE_TARGETDEPS += $$PWD/./pdf_hummus/Build/LibJpeg/libLibJpeg.a
          
          unix:!macx: LIBS += -L$$PWD/./pdf_hummus/Build/LibTiff/ -lLibTiff
          
          INCLUDEPATH += $$PWD/./pdf_hummus/LibTiff
          DEPENDPATH += $$PWD/./pdf_hummus/LibTiff
          
          unix:!macx: PRE_TARGETDEPS += $$PWD/./pdf_hummus/Build/LibTiff/libLibTiff.a
          
          unix:!macx: LIBS += -L$$PWD/./pdf_hummus/Build/ZLib/ -lZlib
          
          INCLUDEPATH += $$PWD/./pdf_hummus/ZLib
          DEPENDPATH += $$PWD/./pdf_hummus/ZLib
          
          unix:!macx: PRE_TARGETDEPS += $$PWD/./pdf_hummus/Build/ZLib/libZlib.a
          
          # Default rules for deployment.
          qnx: target.path = /tmp/$${TARGET}/bin
          else: unix:!android: target.path = /opt/$${TARGET}/bin
          !isEmpty(target.path): INSTALLS += target
          
          DISTFILES += \
          
          JonBJ Online
          JonBJ Online
          JonB
          wrote on last edited by JonB
          #17

          @ronaldon

          • Please when pasting globs of code/.pro file like this learn to use the forum's Code tag to enclose the literal stuff and make it readable by others.

          • In the text you show, which line are you claiming is the one your MinGW will use to add the necessary options for linking with your PDFWriter library? (You might also look at the link line generated which causes the error you quote.)

          ronaldonR 1 Reply Last reply
          0
          • JonBJ JonB

            @ronaldon

            • Please when pasting globs of code/.pro file like this learn to use the forum's Code tag to enclose the literal stuff and make it readable by others.

            • In the text you show, which line are you claiming is the one your MinGW will use to add the necessary options for linking with your PDFWriter library? (You might also look at the link line generated which causes the error you quote.)

            ronaldonR Offline
            ronaldonR Offline
            ronaldon
            wrote on last edited by
            #18

            @JonB
            I'm sorry for the missing code tag, i made the correction. I don't know what MinGW will use. I started my first QT project theses days, i just need learn how configure the external library for develop my routine.

            JonBJ 1 Reply Last reply
            0
            • ronaldonR ronaldon

              @JonB
              I'm sorry for the missing code tag, i made the correction. I don't know what MinGW will use. I started my first QT project theses days, i just need learn how configure the external library for develop my routine.

              JonBJ Online
              JonBJ Online
              JonB
              wrote on last edited by
              #19

              @ronaldon
              It's much better with the code tag! :)

              I'm afarid this is not my area so you'll have to wait for someone else to comment, but: I do not think you are linking against the PDFWriter library.

              unix:!macx: LIBS += -L$$PWD/./pdf_hummus/Build/PDFWriter/ -lPDFWriter
              

              I think you need that line, or similar, for your MinGW. And I assume that line is only applied if you are compiling for unix (and not macx), whereas as you are Windows.

              ronaldonR 2 Replies Last reply
              1
              • JonBJ JonB

                @ronaldon
                It's much better with the code tag! :)

                I'm afarid this is not my area so you'll have to wait for someone else to comment, but: I do not think you are linking against the PDFWriter library.

                unix:!macx: LIBS += -L$$PWD/./pdf_hummus/Build/PDFWriter/ -lPDFWriter
                

                I think you need that line, or similar, for your MinGW. And I assume that line is only applied if you are compiling for unix (and not macx), whereas as you are Windows.

                ronaldonR Offline
                ronaldonR Offline
                ronaldon
                wrote on last edited by ronaldon
                #20
                This post is deleted!
                1 Reply Last reply
                0
                • JonBJ JonB

                  @ronaldon
                  It's much better with the code tag! :)

                  I'm afarid this is not my area so you'll have to wait for someone else to comment, but: I do not think you are linking against the PDFWriter library.

                  unix:!macx: LIBS += -L$$PWD/./pdf_hummus/Build/PDFWriter/ -lPDFWriter
                  

                  I think you need that line, or similar, for your MinGW. And I assume that line is only applied if you are compiling for unix (and not macx), whereas as you are Windows.

                  ronaldonR Offline
                  ronaldonR Offline
                  ronaldon
                  wrote on last edited by
                  #21

                  @JonB
                  My .pro now:

                  QT       += core gui
                  
                  greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
                  
                  CONFIG += c++11
                  
                  # You can make your code fail to compile if it uses deprecated APIs.
                  # In order to do so, uncomment the following line.
                  #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
                  
                  SOURCES += \
                      main.cpp \
                      testpdfhummus.cpp
                  
                  HEADERS += \
                      testpdfhummus.h
                  
                  FORMS += \
                      testpdfhummus.ui
                  
                  # Default rules for deployment.
                  qnx: target.path = /tmp/$${TARGET}/bin
                  else: unix:!android: target.path = /opt/$${TARGET}/bin
                  !isEmpty(target.path): INSTALLS += target
                  
                  #win32:CONFIG(release, debug|release): LIBS += -L$$PWD/pdf_hummus/PDFWriter/release/ -lPDFWriter
                  #else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/pdf_hummus/PDFWriter/debug/ -lPDFWriter
                  
                  #INCLUDEPATH += $$PWD/pdf_hummus/PDFWriter
                  #DEPENDPATH += $$PWD/pdf_hummus/PDFWriter
                  
                  #win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$PWD/pdf_hummus/PDFWriter/release/libPDFWriter.a
                  #else:win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$PWD/pdf_hummus/PDFWriter/debug/libPDFWriter.a
                  #else:win32:!win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$PWD/pdf_hummus/PDFWriter/release/PDFWriter.lib
                  #else:win32:!win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$PWD/pdf_hummus/PDFWriter/debug/PDFWriter.lib
                  
                  win32:CONFIG(release, debug|release): LIBS += -L$$PWD/pdf_hummus/PDFWriter/release/ -lPDFWriter
                  else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/pdf_hummus/PDFWriter/debug/ -lPDFWriter
                  else:macx: LIBS += -L$$PWD/pdf_hummus/PDFWriter/ -lPDFWriter
                  
                  INCLUDEPATH += $$PWD/pdf_hummus/PDFWriter
                  DEPENDPATH += $$PWD/pdf_hummus/PDFWriter
                  
                  win32:CONFIG(release, debug|release): LIBS += -L$$PWD/pdf_hummus/FreeType/release/ -lFreeType
                  else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/pdf_hummus/FreeType/debug/ -lFreeType
                  else:macx: LIBS += -L$$PWD/pdf_hummus/FreeType/ -lFreeType
                  
                  INCLUDEPATH += $$PWD/pdf_hummus/FreeType/Release
                  DEPENDPATH += $$PWD/pdf_hummus/FreeType/Release
                  
                  win32:CONFIG(release, debug|release): LIBS += -L$$PWD/pdf_hummus/LibJpeg/release/ -lLibJpeg
                  else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/pdf_hummus/LibJpeg/debug/ -lLibJpeg
                  else:macx: LIBS += -L$$PWD/pdf_hummus/LibJpeg/ -lLibJpeg
                  
                  INCLUDEPATH += $$PWD/pdf_hummus/LibJpeg/Release
                  DEPENDPATH += $$PWD/pdf_hummus/LibJpeg/Release
                  
                  win32:CONFIG(release, debug|release): LIBS += -L$$PWD/pdf_hummus/LibTiff/release/ -lLibTiff
                  else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/pdf_hummus/LibTiff/debug/ -lLibTiff
                  else:macx: LIBS += -L$$PWD/pdf_hummus/LibTiff/ -lLibTiff
                  
                  INCLUDEPATH += $$PWD/pdf_hummus/LibTiff/Release
                  DEPENDPATH += $$PWD/pdf_hummus/LibTiff/Release
                  
                  win32:CONFIG(release, debug|release): LIBS += -L$$PWD/pdf_hummus/ZLib/release/ -lZlib
                  else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/pdf_hummus/ZLib/debug/ -lZlib
                  else:macx: LIBS += -L$$PWD/pdf_hummus/ZLib/ -lZlib
                  
                  INCLUDEPATH += $$PWD/pdf_hummus/ZLib/Release
                  DEPENDPATH += $$PWD/pdf_hummus/ZLib/Release
                  
                  

                  And the image of error:
                  alt text

                  JonBJ 1 Reply Last reply
                  0
                  • ronaldonR ronaldon

                    @JonB
                    My .pro now:

                    QT       += core gui
                    
                    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
                    
                    CONFIG += c++11
                    
                    # You can make your code fail to compile if it uses deprecated APIs.
                    # In order to do so, uncomment the following line.
                    #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
                    
                    SOURCES += \
                        main.cpp \
                        testpdfhummus.cpp
                    
                    HEADERS += \
                        testpdfhummus.h
                    
                    FORMS += \
                        testpdfhummus.ui
                    
                    # Default rules for deployment.
                    qnx: target.path = /tmp/$${TARGET}/bin
                    else: unix:!android: target.path = /opt/$${TARGET}/bin
                    !isEmpty(target.path): INSTALLS += target
                    
                    #win32:CONFIG(release, debug|release): LIBS += -L$$PWD/pdf_hummus/PDFWriter/release/ -lPDFWriter
                    #else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/pdf_hummus/PDFWriter/debug/ -lPDFWriter
                    
                    #INCLUDEPATH += $$PWD/pdf_hummus/PDFWriter
                    #DEPENDPATH += $$PWD/pdf_hummus/PDFWriter
                    
                    #win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$PWD/pdf_hummus/PDFWriter/release/libPDFWriter.a
                    #else:win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$PWD/pdf_hummus/PDFWriter/debug/libPDFWriter.a
                    #else:win32:!win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$PWD/pdf_hummus/PDFWriter/release/PDFWriter.lib
                    #else:win32:!win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$PWD/pdf_hummus/PDFWriter/debug/PDFWriter.lib
                    
                    win32:CONFIG(release, debug|release): LIBS += -L$$PWD/pdf_hummus/PDFWriter/release/ -lPDFWriter
                    else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/pdf_hummus/PDFWriter/debug/ -lPDFWriter
                    else:macx: LIBS += -L$$PWD/pdf_hummus/PDFWriter/ -lPDFWriter
                    
                    INCLUDEPATH += $$PWD/pdf_hummus/PDFWriter
                    DEPENDPATH += $$PWD/pdf_hummus/PDFWriter
                    
                    win32:CONFIG(release, debug|release): LIBS += -L$$PWD/pdf_hummus/FreeType/release/ -lFreeType
                    else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/pdf_hummus/FreeType/debug/ -lFreeType
                    else:macx: LIBS += -L$$PWD/pdf_hummus/FreeType/ -lFreeType
                    
                    INCLUDEPATH += $$PWD/pdf_hummus/FreeType/Release
                    DEPENDPATH += $$PWD/pdf_hummus/FreeType/Release
                    
                    win32:CONFIG(release, debug|release): LIBS += -L$$PWD/pdf_hummus/LibJpeg/release/ -lLibJpeg
                    else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/pdf_hummus/LibJpeg/debug/ -lLibJpeg
                    else:macx: LIBS += -L$$PWD/pdf_hummus/LibJpeg/ -lLibJpeg
                    
                    INCLUDEPATH += $$PWD/pdf_hummus/LibJpeg/Release
                    DEPENDPATH += $$PWD/pdf_hummus/LibJpeg/Release
                    
                    win32:CONFIG(release, debug|release): LIBS += -L$$PWD/pdf_hummus/LibTiff/release/ -lLibTiff
                    else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/pdf_hummus/LibTiff/debug/ -lLibTiff
                    else:macx: LIBS += -L$$PWD/pdf_hummus/LibTiff/ -lLibTiff
                    
                    INCLUDEPATH += $$PWD/pdf_hummus/LibTiff/Release
                    DEPENDPATH += $$PWD/pdf_hummus/LibTiff/Release
                    
                    win32:CONFIG(release, debug|release): LIBS += -L$$PWD/pdf_hummus/ZLib/release/ -lZlib
                    else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/pdf_hummus/ZLib/debug/ -lZlib
                    else:macx: LIBS += -L$$PWD/pdf_hummus/ZLib/ -lZlib
                    
                    INCLUDEPATH += $$PWD/pdf_hummus/ZLib/Release
                    DEPENDPATH += $$PWD/pdf_hummus/ZLib/Release
                    
                    

                    And the image of error:
                    alt text

                    JonBJ Online
                    JonBJ Online
                    JonB
                    wrote on last edited by
                    #22

                    @ronaldon
                    I would start by looking at the actual linker command line being executed during the build. All you show is the errors, without showing the command line.

                    ronaldonR 1 Reply Last reply
                    0
                    • JonBJ JonB

                      @ronaldon
                      I would start by looking at the actual linker command line being executed during the build. All you show is the errors, without showing the command line.

                      ronaldonR Offline
                      ronaldonR Offline
                      ronaldon
                      wrote on last edited by ronaldon
                      #23

                      @JonB
                      This is my compile output:

                      19:35:50: Running steps for project TestPDFhummus...
                      19:35:50: Configuration unchanged, skipping qmake step.
                      19:35:50: Starting: "C:\Qt\Tools\mingw810_64\bin\mingw32-make.exe" -j6
                      C:/Qt/Tools/mingw810_64/bin/mingw32-make -f Makefile.Debug
                      mingw32-make[1]: Entering directory 'C:/Users/Usuario/Documents/QTProjects/build-TestPDFhummus-Desktop_Qt_5_15_2_MinGW_64_bit-Debug'
                      g++ -c -fno-keep-inline-dllexport -g -std=gnu++11 -Wall -Wextra -Wextra -fexceptions -mthreads -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN -I..\TestPDFhummus -I. -I..\TestPDFhummus\pdf_hummus\PDFWriter -I..\TestPDFhummus\pdf_hummus\FreeType\Release -I..\TestPDFhummus\pdf_hummus\LibJpeg\Release -I..\TestPDFhummus\pdf_hummus\LibTiff\Release -I..\TestPDFhummus\pdf_hummus\ZLib\Release -IC:\Qt\5.15.2\mingw81_64\include -IC:\Qt\5.15.2\mingw81_64\include\QtWidgets -IC:\Qt\5.15.2\mingw81_64\include\QtGui -IC:\Qt\5.15.2\mingw81_64\include\QtANGLE -IC:\Qt\5.15.2\mingw81_64\include\QtCore -Idebug -I. -I/include -IC:\Qt\5.15.2\mingw81_64\mkspecs\win32-g++  -o debug\main.o ..\TestPDFhummus\main.cpp
                      g++ -Wl,-subsystem,windows -mthreads -o debug\TestPDFhummus.exe debug/main.o debug/testpdfhummus.o debug/moc_testpdfhummus.o  -L"C:\Users\Usuario\Documents\QTProjects\TestPDFhummus\pdf_hummus\PDFWriter\debug\PDFWriter.lib" -lPDFWriter -L"C:\Users\Usuario\Documents\QTProjects\TestPDFhummus\pdf_hummus\FreeType\debug" -lFreeType -L"C:\Users\Usuario\Documents\QTProjects\TestPDFhummus\pdf_hummus\LibJpeg\debug" -lLibJpeg -L"C:\Users\Usuario\Documents\QTProjects\TestPDFhummus\pdf_hummus\LibTiff\debug" -lLibTiff -L"C:\Users\Usuario\Documents\QTProjects\TestPDFhummus\pdf_hummus\ZLib\debug" -lZlib C:\Qt\5.15.2\mingw81_64\lib\libQt5Widgets.a C:\Qt\5.15.2\mingw81_64\lib\libQt5Gui.a C:\Qt\5.15.2\mingw81_64\lib\libQt5Core.a  -lmingw32 C:\Qt\5.15.2\mingw81_64\lib\libqtmain.a -LC:\openssl\lib -LC:\Utils\my_sql\mysql-5.7.25-winx64\lib -LC:\Utils\postgresql\pgsql\lib -lshell32 
                      C:/Qt/Tools/mingw810_64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lPDFWriter
                      collect2.exe: error: ld returned 1 exit status
                      mingw32-make[1]: *** [Makefile.Debug:72: debug/TestPDFhummus.exe] Error 1
                      mingw32-make: *** [Makefile:45: debug] Error 2
                      mingw32-make[1]: Leaving directory 'C:/Users/Usuario/Documents/QTProjects/build-TestPDFhummus-Desktop_Qt_5_15_2_MinGW_64_bit-Debug'
                      19:35:57: The process "C:\Qt\Tools\mingw810_64\bin\mingw32-make.exe" exited with code 2.
                      Error while building/deploying project TestPDFhummus (kit: Desktop Qt 5.15.2 MinGW 64-bit)
                      When executing step "Make"
                      19:35:57: Elapsed time: 00:06.
                      
                      JonBJ 1 Reply Last reply
                      0
                      • ronaldonR ronaldon

                        @JonB
                        This is my compile output:

                        19:35:50: Running steps for project TestPDFhummus...
                        19:35:50: Configuration unchanged, skipping qmake step.
                        19:35:50: Starting: "C:\Qt\Tools\mingw810_64\bin\mingw32-make.exe" -j6
                        C:/Qt/Tools/mingw810_64/bin/mingw32-make -f Makefile.Debug
                        mingw32-make[1]: Entering directory 'C:/Users/Usuario/Documents/QTProjects/build-TestPDFhummus-Desktop_Qt_5_15_2_MinGW_64_bit-Debug'
                        g++ -c -fno-keep-inline-dllexport -g -std=gnu++11 -Wall -Wextra -Wextra -fexceptions -mthreads -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN -I..\TestPDFhummus -I. -I..\TestPDFhummus\pdf_hummus\PDFWriter -I..\TestPDFhummus\pdf_hummus\FreeType\Release -I..\TestPDFhummus\pdf_hummus\LibJpeg\Release -I..\TestPDFhummus\pdf_hummus\LibTiff\Release -I..\TestPDFhummus\pdf_hummus\ZLib\Release -IC:\Qt\5.15.2\mingw81_64\include -IC:\Qt\5.15.2\mingw81_64\include\QtWidgets -IC:\Qt\5.15.2\mingw81_64\include\QtGui -IC:\Qt\5.15.2\mingw81_64\include\QtANGLE -IC:\Qt\5.15.2\mingw81_64\include\QtCore -Idebug -I. -I/include -IC:\Qt\5.15.2\mingw81_64\mkspecs\win32-g++  -o debug\main.o ..\TestPDFhummus\main.cpp
                        g++ -Wl,-subsystem,windows -mthreads -o debug\TestPDFhummus.exe debug/main.o debug/testpdfhummus.o debug/moc_testpdfhummus.o  -L"C:\Users\Usuario\Documents\QTProjects\TestPDFhummus\pdf_hummus\PDFWriter\debug\PDFWriter.lib" -lPDFWriter -L"C:\Users\Usuario\Documents\QTProjects\TestPDFhummus\pdf_hummus\FreeType\debug" -lFreeType -L"C:\Users\Usuario\Documents\QTProjects\TestPDFhummus\pdf_hummus\LibJpeg\debug" -lLibJpeg -L"C:\Users\Usuario\Documents\QTProjects\TestPDFhummus\pdf_hummus\LibTiff\debug" -lLibTiff -L"C:\Users\Usuario\Documents\QTProjects\TestPDFhummus\pdf_hummus\ZLib\debug" -lZlib C:\Qt\5.15.2\mingw81_64\lib\libQt5Widgets.a C:\Qt\5.15.2\mingw81_64\lib\libQt5Gui.a C:\Qt\5.15.2\mingw81_64\lib\libQt5Core.a  -lmingw32 C:\Qt\5.15.2\mingw81_64\lib\libqtmain.a -LC:\openssl\lib -LC:\Utils\my_sql\mysql-5.7.25-winx64\lib -LC:\Utils\postgresql\pgsql\lib -lshell32 
                        C:/Qt/Tools/mingw810_64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lPDFWriter
                        collect2.exe: error: ld returned 1 exit status
                        mingw32-make[1]: *** [Makefile.Debug:72: debug/TestPDFhummus.exe] Error 1
                        mingw32-make: *** [Makefile:45: debug] Error 2
                        mingw32-make[1]: Leaving directory 'C:/Users/Usuario/Documents/QTProjects/build-TestPDFhummus-Desktop_Qt_5_15_2_MinGW_64_bit-Debug'
                        19:35:57: The process "C:\Qt\Tools\mingw810_64\bin\mingw32-make.exe" exited with code 2.
                        Error while building/deploying project TestPDFhummus (kit: Desktop Qt 5.15.2 MinGW 64-bit)
                        When executing step "Make"
                        19:35:57: Elapsed time: 00:06.
                        
                        JonBJ Online
                        JonBJ Online
                        JonB
                        wrote on last edited by
                        #24

                        @ronaldon said in PDFhummus error: PDFWriter.h: No such file or directory. I need help to use PDFhummus with QT Creator:

                        -L"C:\Users\Ronaldo Fernandes\Documents\QTProjects\TestPDFhummus\pdf_hummus\PDFWriter\debug\PDFWriter.lib" -lPDFWriter
                        
                        ld.exe: cannot find -lPDFWriter
                        

                        There is something wrong here. You have debug\PDFWriter.lib at the end of the -L argument. That is a file, and that is wrong. It should be a directory where -lPDFWriter is to find the PDFWriter library file.

                        Compare against what else you have in the llinker line, like

                        -L"C:\Users\Ronaldo Fernandes\Documents\QTProjects\TestPDFhummus\pdf_hummus\FreeType\debug" -lFreeType
                        

                        See how that -L only names the debug directory for the -lFreeType to search for it? That's how it should be.

                        Additional to that you have PDFWriter.lib mentioned. But (so far as I know) .lib files are only used as library files for the MSVC compiler. You are using MinGW, its libraries should only be .a files, I believe.

                        Go look at how the path ending in debug\PDFWriter.lib is being generated, and correct. And make sure what you have for PDFWriter is for MinGW, not for MSVC.

                        1 Reply Last reply
                        1
                        • ronaldonR Offline
                          ronaldonR Offline
                          ronaldon
                          wrote on last edited by
                          #25

                          @JonB, Is there a possibility of having a version of the Hummus PDF for MinGW, or do I have to somehow change the output of the compilation to the ".a" file? The PDF project Hummus was developed in the visual studio as far as I could see. What I need is to compile it and add it to my QT Creator project.

                          JonBJ 1 Reply Last reply
                          0
                          • ronaldonR ronaldon

                            @JonB, Is there a possibility of having a version of the Hummus PDF for MinGW, or do I have to somehow change the output of the compilation to the ".a" file? The PDF project Hummus was developed in the visual studio as far as I could see. What I need is to compile it and add it to my QT Creator project.

                            JonBJ Online
                            JonBJ Online
                            JonB
                            wrote on last edited by JonB
                            #26

                            @ronaldon
                            You cannot link mixing compilers.

                            MinGW produces .a libraries. MSVC produces .lib libraries. You need to pick one of the two compilers and compile both your own code and third-party code with the same compiler toolchain.

                            1 Reply Last reply
                            1

                            • Login

                            • Login or register to search.
                            • First post
                              Last post
                            0
                            • Categories
                            • Recent
                            • Tags
                            • Popular
                            • Users
                            • Groups
                            • Search
                            • Get Qt Extensions
                            • Unsolved