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. QT Error with Twain Data Source

QT Error with Twain Data Source

Scheduled Pinned Locked Moved Unsolved 3rd Party Software
37 Posts 2 Posters 18.9k Views 2 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.
  • B Offline
    B Offline
    bhim
    wrote on last edited by
    #28

    Thanks. I m able to build and run it now. But not able to find the output file, a .ds file anywhere? Can you please help me find where project is generating this file.

    Below is pro file code

    unix {
    TEMPLATE = lib
    VERSION = 1.0
    DEFINES += UNIX
    }
    PROJECT_FILE_NAME = TWAINDS_FreeImage
    TARGET = $$PROJECT_FILE_NAME
    LIBS += -lfreeimage

    TWAIN datasources end with a .ds instead of .so

    QMAKE_POST_LINK = cp
    $(TARGET)
    $${PROJECT_FILE_NAME}.ds
    ds.path = /usr/local/lib/twain/FreeImage
    ds.files = $${PROJECT_FILE_NAME}.ds
    TWAIN_logo.png
    INSTALLS += ds
    QMAKE_CLEAN = $${PROJECT_FILE_NAME}.ds
    INCLUDEPATH = /usr/local/include
    ../../pub/external/include
    ../../pub/include
    ../../visual_studio/Debug32
    ../../common
    LIBS += -L"../../pub/external/lib" -lFreeImage
    SOURCES += ../../common/CTiffWriter.cpp
    ../../common/CommonTWAIN.cpp
    CommonDS.cpp
    CScanner_FreeImage.cpp
    CTWAINDS_Base.cpp
    CTWAINDS_FreeImage.cpp
    DSMInterface.cpp
    TWAINContainer.cpp
    TWAINContainerFix32.cpp
    TWAINContainerFrame.cpp
    TWAINContainerInt.cpp
    CTWAINDS_Sample1.cpp
    TWAIN_UI.cpp
    TWAINContainerString.cpp
    TWAINContainerFix32Range.cpp
    TWAINContainerBool.cpp
    QT_UI.cpp
    Qt_MainForm.cpp
    Qt_About.cpp
    Qt_ProfileName.cpp
    HEADERS += ../../common/Common.h
    ../../common/CommonTWAIN.h
    ../../common/CTiffWriter.h
    CScanner_FreeImage.h
    CTWAINDS_Base.h
    CTWAINDS_FreeImage.h
    CommonDS.h
    DSMInterface.h
    TWAINContainerFix32.h
    TWAINContainerFrame.h
    TWAINContainer.h
    TWAINContainerInt.h
    CTWAINDS_Sample1.h
    TWAIN_UI.h
    TWAINContainerString.h
    TWAINContainerFix32Range.h
    TWAINContainerBool.h
    QT_UI.h
    Qt_MainForm.h
    Qt_About.h
    Qt_ProfileName.h
    ui_About.h
    ui_MainForm.h
    ui_About.h
    TEMPLATE = lib
    CONFIG += warn_on
    debug
    x86 ppc

    QMAKE_BUNDLE_EXTENSION = ds

    this project doesn't need any QT libs.

    QMAKE_LIBS_QT =
    QMAKE_LIBS_QT_THREAD =
    FORMS += MainForm.ui
    About.ui
    ProfileName.ui
    RESOURCES += qtresources.qrc

    unix|win32: LIBS += -lshell32

    mrjjM 1 Reply Last reply
    0
    • B bhim

      Thanks. I m able to build and run it now. But not able to find the output file, a .ds file anywhere? Can you please help me find where project is generating this file.

      Below is pro file code

      unix {
      TEMPLATE = lib
      VERSION = 1.0
      DEFINES += UNIX
      }
      PROJECT_FILE_NAME = TWAINDS_FreeImage
      TARGET = $$PROJECT_FILE_NAME
      LIBS += -lfreeimage

      TWAIN datasources end with a .ds instead of .so

      QMAKE_POST_LINK = cp
      $(TARGET)
      $${PROJECT_FILE_NAME}.ds
      ds.path = /usr/local/lib/twain/FreeImage
      ds.files = $${PROJECT_FILE_NAME}.ds
      TWAIN_logo.png
      INSTALLS += ds
      QMAKE_CLEAN = $${PROJECT_FILE_NAME}.ds
      INCLUDEPATH = /usr/local/include
      ../../pub/external/include
      ../../pub/include
      ../../visual_studio/Debug32
      ../../common
      LIBS += -L"../../pub/external/lib" -lFreeImage
      SOURCES += ../../common/CTiffWriter.cpp
      ../../common/CommonTWAIN.cpp
      CommonDS.cpp
      CScanner_FreeImage.cpp
      CTWAINDS_Base.cpp
      CTWAINDS_FreeImage.cpp
      DSMInterface.cpp
      TWAINContainer.cpp
      TWAINContainerFix32.cpp
      TWAINContainerFrame.cpp
      TWAINContainerInt.cpp
      CTWAINDS_Sample1.cpp
      TWAIN_UI.cpp
      TWAINContainerString.cpp
      TWAINContainerFix32Range.cpp
      TWAINContainerBool.cpp
      QT_UI.cpp
      Qt_MainForm.cpp
      Qt_About.cpp
      Qt_ProfileName.cpp
      HEADERS += ../../common/Common.h
      ../../common/CommonTWAIN.h
      ../../common/CTiffWriter.h
      CScanner_FreeImage.h
      CTWAINDS_Base.h
      CTWAINDS_FreeImage.h
      CommonDS.h
      DSMInterface.h
      TWAINContainerFix32.h
      TWAINContainerFrame.h
      TWAINContainer.h
      TWAINContainerInt.h
      CTWAINDS_Sample1.h
      TWAIN_UI.h
      TWAINContainerString.h
      TWAINContainerFix32Range.h
      TWAINContainerBool.h
      QT_UI.h
      Qt_MainForm.h
      Qt_About.h
      Qt_ProfileName.h
      ui_About.h
      ui_MainForm.h
      ui_About.h
      TEMPLATE = lib
      CONFIG += warn_on
      debug
      x86 ppc

      QMAKE_BUNDLE_EXTENSION = ds

      this project doesn't need any QT libs.

      QMAKE_LIBS_QT =
      QMAKE_LIBS_QT_THREAD =
      FORMS += MainForm.ui
      About.ui
      ProfileName.ui
      RESOURCES += qtresources.qrc

      unix|win32: LIBS += -lshell32

      mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #29

      @bhim
      Its not in build folder?

      1 Reply Last reply
      0
      • B Offline
        B Offline
        bhim
        wrote on last edited by
        #30

        Its there, but its in dll extension, its supposed to be .ds extension.

        mrjjM 1 Reply Last reply
        0
        • B bhim

          Its there, but its in dll extension, its supposed to be .ds extension.

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #31

          @bhim
          What is a .ds file ?

          1 Reply Last reply
          0
          • B Offline
            B Offline
            bhim
            wrote on last edited by
            #32

            ds is Twain data source, OR Twain Driver. See below from my pro file, based on this it should have generated

            TWAIN datasources end with a .ds instead of .so

            QMAKE_POST_LINK = cp
            $(TARGET)
            $${PROJECT_FILE_NAME}.ds
            ds.path = /usr/local/lib/twain/FreeImage
            ds.files = $${PROJECT_FILE_NAME}.ds
            TWAIN_logo.png
            INSTALLS += ds
            QMAKE_CLEAN = $${PROJECT_FILE_NAME}.ds

            mrjjM 1 Reply Last reply
            0
            • B bhim

              ds is Twain data source, OR Twain Driver. See below from my pro file, based on this it should have generated

              TWAIN datasources end with a .ds instead of .so

              QMAKE_POST_LINK = cp
              $(TARGET)
              $${PROJECT_FILE_NAME}.ds
              ds.path = /usr/local/lib/twain/FreeImage
              ds.files = $${PROJECT_FILE_NAME}.ds
              TWAIN_logo.png
              INSTALLS += ds
              QMAKE_CLEAN = $${PROJECT_FILE_NAME}.ds

              mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on last edited by
              #33

              @bhim
              Ok but a SO file is a DLL.
              so being on windows, i wonder if the DS is just a DLL.

              Is that to load into the sample project ?

              1 Reply Last reply
              0
              • B Offline
                B Offline
                bhim
                wrote on last edited by
                #34

                I change the DLL extension to ds and replaced with original DS file. It dd not work, it was not even detected. I think if somehow i could emit a .ds file , it will work. Below is the project property of visual studio project which generated original ds file

                0_1513895238850_1e6725b3-35b3-43c1-8cc2-32666e9a61cf-image.png

                1 Reply Last reply
                0
                • mrjjM Offline
                  mrjjM Offline
                  mrjj
                  Lifetime Qt Champion
                  wrote on last edited by
                  #35

                  Sorry i have no idea what / how a ds file should be produced.
                  Site says
                  copy TWAINDS_Sample[32|64].ds to /Windows/twain_[32|64]/sample2
                  so it looks like a DLL. but sadly i cant find out more.

                  1 Reply Last reply
                  0
                  • B Offline
                    B Offline
                    bhim
                    wrote on last edited by
                    #36

                    Coding wise everything looks fine, I am trying to debug ds file using a sample connection application. But connection application itself is giving below error. Can you please help.

                    0_1513898201339_529f0520-4c9a-47d1-9056-e064c3587660-image.png

                    1 Reply Last reply
                    0
                    • mrjjM Offline
                      mrjjM Offline
                      mrjj
                      Lifetime Qt Champion
                      wrote on last edited by
                      #37

                      HI
                      The UNUSED ARG ?

                      1 Reply Last reply
                      0

                      • Login

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