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
Forum Updated to NodeBB v4.3 + New Features

QT Error with Twain Data Source

Scheduled Pinned Locked Moved Unsolved 3rd Party Software
37 Posts 2 Posters 13.3k 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 20 Dec 2017, 19:51 last edited by
    #7

    Yes, i installed and used qt-opensource-windows-x86-vs2008-4.8.7.exe

    It list only None in QT Version tab.

    I had vs 2008 also already installed.

    Please help.

    M 1 Reply Last reply 20 Dec 2017, 19:58
    0
    • B bhim
      20 Dec 2017, 19:51

      Yes, i installed and used qt-opensource-windows-x86-vs2008-4.8.7.exe

      It list only None in QT Version tab.

      I had vs 2008 also already installed.

      Please help.

      M Offline
      M Offline
      mrjj
      Lifetime Qt Champion
      wrote on 20 Dec 2017, 19:58 last edited by
      #8

      @bhim
      Hi
      It should have picked it up.
      Not sure what went wrong.
      Sadly i dont have any vs 2008 to test with and not sure why no Qt is listed.

      Give some time. Maybe someone is still using vs2008 :)

      1 Reply Last reply
      0
      • B Offline
        B Offline
        bhim
        wrote on 20 Dec 2017, 20:01 last edited by
        #9

        Also this is what i have installed, can this be the culprit?

        0_1513799635064_17aeedfa-7447-44a1-b2d3-2051839c272c-image.png

        Meantime i will also try on a machine where vs2008 is not installed.

        M 1 Reply Last reply 20 Dec 2017, 20:05
        0
        • B bhim
          20 Dec 2017, 20:01

          Also this is what i have installed, can this be the culprit?

          0_1513799635064_17aeedfa-7447-44a1-b2d3-2051839c272c-image.png

          Meantime i will also try on a machine where vs2008 is not installed.

          M Offline
          M Offline
          mrjj
          Lifetime Qt Champion
          wrote on 20 Dec 2017, 20:05 last edited by mrjj
          #10

          @bhim
          Did you also install a QT binary ?
          That is only the editor
          named something like Qt 2008 visual studio 2008

          can you show image of all that can be selected?

          1 Reply Last reply
          0
          • B Offline
            B Offline
            bhim
            wrote on 20 Dec 2017, 20:16 last edited by
            #11

            I am not sure if i installed QT binary. Can you please provide me download path? Also the QT Version drop down is only show None.

            1 Reply Last reply
            0
            • B Offline
              B Offline
              bhim
              wrote on 20 Dec 2017, 20:53 last edited by
              #12

              Hi ,

              Thanks for your help. I m able to open and configure the project now. But getting below error when i build it. Can you please have a look and help.

              0_1513803176191_8ae67440-c489-4b3f-b3b6-6fdbf8954d33-image.png

              M 1 Reply Last reply 20 Dec 2017, 21:00
              0
              • B bhim
                20 Dec 2017, 20:53

                Hi ,

                Thanks for your help. I m able to open and configure the project now. But getting below error when i build it. Can you please have a look and help.

                0_1513803176191_8ae67440-c489-4b3f-b3b6-6fdbf8954d33-image.png

                M Offline
                M Offline
                mrjj
                Lifetime Qt Champion
                wrote on 20 Dec 2017, 21:00 last edited by
                #13

                @bhim
                seem to be kinda old/invalid .pro file
                can you show what is inside?

                1 Reply Last reply
                0
                • B Offline
                  B Offline
                  bhim
                  wrote on 20 Dec 2017, 21:08 last edited by
                  #14

                  Below is the content of pro file

                  unix {
                  TEMPLATE = subdirs
                  VERSION = 1.0
                  DEFINES += UNIX
                  }

                  SUBDIRS = src

                  I have also shared entire project at below location for you.

                  https://drive.google.com/drive/folders/1gj69Kh7Xy8-p91uE3QUao673wqxoHidx?usp=sharing

                  M 1 Reply Last reply 20 Dec 2017, 21:42
                  0
                  • B bhim
                    20 Dec 2017, 21:08

                    Below is the content of pro file

                    unix {
                    TEMPLATE = subdirs
                    VERSION = 1.0
                    DEFINES += UNIX
                    }

                    SUBDIRS = src

                    I have also shared entire project at below location for you.

                    https://drive.google.com/drive/folders/1gj69Kh7Xy8-p91uE3QUao673wqxoHidx?usp=sharing

                    M Offline
                    M Offline
                    mrjj
                    Lifetime Qt Champion
                    wrote on 20 Dec 2017, 21:42 last edited by
                    #15

                    @bhim
                    its wrong project file
                    there is
                    src.pro
                    in src

                    that seems better

                    1 Reply Last reply
                    0
                    • B Offline
                      B Offline
                      bhim
                      wrote on 20 Dec 2017, 21:58 last edited by
                      #16

                      Thanks It much better now. Though i am still getting lot of errors but these are datatype error and seems like code specific.

                      Thanks a lot for your help.

                      Bhim

                      M 1 Reply Last reply 20 Dec 2017, 22:07
                      0
                      • B bhim
                        20 Dec 2017, 21:58

                        Thanks It much better now. Though i am still getting lot of errors but these are datatype error and seems like code specific.

                        Thanks a lot for your help.

                        Bhim

                        M Offline
                        M Offline
                        mrjj
                        Lifetime Qt Champion
                        wrote on 20 Dec 2017, 22:07 last edited by
                        #17

                        @bhim
                        Np.
                        I noticed there are some FreeImage lib files.
                        Not sure it uses it but make sure they are compatible with vs 2008 if it does.

                        Its pretty old project. there are no newer twain samples?

                        1 Reply Last reply
                        0
                        • B Offline
                          B Offline
                          bhim
                          wrote on 20 Dec 2017, 22:10 last edited by bhim
                          #18

                          This is the latest sample they have. With this i m getting below error , would you be able to help with this one as well?

                          I know how to take care of these in VS but not in QT.

                          0_1513807832766_fe2a45f3-5e33-45ca-984a-82710a9c14af-image.png

                          M 1 Reply Last reply 20 Dec 2017, 22:15
                          0
                          • B bhim
                            20 Dec 2017, 22:10

                            This is the latest sample they have. With this i m getting below error , would you be able to help with this one as well?

                            I know how to take care of these in VS but not in QT.

                            0_1513807832766_fe2a45f3-5e33-45ca-984a-82710a9c14af-image.png

                            M Offline
                            M Offline
                            mrjj
                            Lifetime Qt Champion
                            wrote on 20 Dec 2017, 22:15 last edited by
                            #19

                            @bhim
                            Well Qt is just a normal c++ LIB
                            and those are normal windows API calls so fix them like you normal would.
                            seems to be unicode related.
                            Didnt it later become common to put _TCHAR or something in front ?
                            or use wchar_t* and not char * ?
                            maybe you can just use the A version of the API and not W version

                            1 Reply Last reply
                            0
                            • M Offline
                              M Offline
                              mrjj
                              Lifetime Qt Champion
                              wrote on 20 Dec 2017, 22:19 last edited by
                              #20

                              Hi
                              I wondered if
                              https://github.com/twain/twain-samples
                              is something else than the twain you try ?

                              1 Reply Last reply
                              0
                              • B Offline
                                B Offline
                                bhim
                                wrote on 20 Dec 2017, 23:41 last edited by
                                #21

                                I tried the exact same exact same Twain.

                                M 1 Reply Last reply 21 Dec 2017, 06:56
                                0
                                • B bhim
                                  20 Dec 2017, 23:41

                                  I tried the exact same exact same Twain.

                                  M Offline
                                  M Offline
                                  mrjj
                                  Lifetime Qt Champion
                                  wrote on 21 Dec 2017, 06:56 last edited by
                                  #22

                                  @bhim
                                  Ok but it didnt work or was not what you wanted?

                                  1 Reply Last reply
                                  0
                                  • B Offline
                                    B Offline
                                    bhim
                                    wrote on 21 Dec 2017, 15:36 last edited by
                                    #23

                                    It did not work. However i am able to resolve most of the error for data type conversion. I am now stuck at below, i am not able to go to definition\declaration of this method to make any change. I know how to do it in Visual Studio but not in QT. Can you please help

                                    0_1513870545958_2d8762fa-efe9-42b6-9bcb-a13c435fa223-image.png

                                    1 Reply Last reply
                                    0
                                    • B Offline
                                      B Offline
                                      bhim
                                      wrote on 21 Dec 2017, 17:01 last edited by bhim
                                      #24

                                      Hi,

                                      I have resolved all string related error. Now my project is showing this :-1: error: LNK1104: cannot open file 'freeimage.lib' . If i could find the Visual Studio equivalent or Project property in QT, that would be very helpful to very file the linker paths.

                                      M 1 Reply Last reply 21 Dec 2017, 18:42
                                      0
                                      • B bhim
                                        21 Dec 2017, 17:01

                                        Hi,

                                        I have resolved all string related error. Now my project is showing this :-1: error: LNK1104: cannot open file 'freeimage.lib' . If i could find the Visual Studio equivalent or Project property in QT, that would be very helpful to very file the linker paths.

                                        M Offline
                                        M Offline
                                        mrjj
                                        Lifetime Qt Champion
                                        wrote on 21 Dec 2017, 18:42 last edited by
                                        #25

                                        @bhim
                                        you mean to link the LIB file to the project ?
                                        http://doc.qt.io/qt-5/third-party-libraries.html
                                        http://doc.qt.io/qtcreator/creator-project-qmake-libraries.html

                                        Basically you need a
                                        LIBS += -L"3rdparty/CatWhisperer/lib" -lCatWhisperer
                                        (with correct names of course)

                                        1 Reply Last reply
                                        1
                                        • B Offline
                                          B Offline
                                          bhim
                                          wrote on 21 Dec 2017, 19:37 last edited by
                                          #26

                                          Thanks , this resolve the lib issue. Now below 2 error

                                          14:31:45: Running steps for project src...
                                          14:31:45: Configuration unchanged, skipping qmake step.
                                          14:31:45: Starting: "C:\Qt\qtcreator-4.5.0\bin\jom.exe"
                                          c:\Qt\4.8.7\bin\qmake.exe -spec c:\Qt\4.8.7\mkspecs\win32-msvc2008 CONFIG+=release -o Makefile ..\src\src.pro
                                          C:\Qt\qtcreator-4.5.0\bin\jom.exe -f Makefile.Debug
                                          link /LIBPATH:"c:\Qt\4.8.7\lib" /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /DLL /MANIFEST /MANIFESTFILE:"debug\TWAINDS_FreeImage.intermediate.manifest" /OUT:debug\TWAINDS_FreeImage.dll @C:\Users\rathorb\AppData\Local\Temp\TWAINDS_FreeImage.dll.13524.62.jom
                                          TWAIN_UI.obj : error LNK2019: unresolved external symbol __imp__SHGetSpecialFolderPathA@16 referenced in function "public: __thiscall CTWAIN_UI::CTWAIN_UI(class CTWAINDS_FreeImage *)" (??0CTWAIN_UI@@QAE@PAVCTWAINDS_FreeImage@@@Z)
                                          debug\TWAINDS_FreeImage.dll : fatal error LNK1120: 1 unresolved externals
                                          jom: C:\ODIImages\Source\Twain\twain-samples-master\twain-samples-master\TWAIN-Samples\Twain_DS_sample01\build-src-Unnamed-Release\Makefile.Debug [debug\TWAINDS_FreeImage.dll] Error 1120
                                          jom: C:\ODIImages\Source\Twain\twain-samples-master\twain-samples-master\TWAIN-Samples\Twain_DS_sample01\build-src-Unnamed-Release\Makefile [debug] Error 2
                                          14:31:51: The process "C:\Qt\qtcreator-4.5.0\bin\jom.exe" exited with code 2.
                                          Error while building/deploying project src (kit: Unnamed)
                                          The kit Unnamed has configuration issues which might be the root cause for this problem.
                                          When executing step "Make"
                                          14:31:51: Elapsed time: 00:06.

                                          debug\TWAINDS_FreeImage.dll:-1: error: LNK1120: 1 unresolved externals

                                          1 Reply Last reply
                                          0

                                          16/37

                                          20 Dec 2017, 21:58

                                          • Login

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