Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Required Library of Imapi2 for Qt with mingw compiler on windows
Forum Updated to NodeBB v4.3 + New Features

Required Library of Imapi2 for Qt with mingw compiler on windows

Scheduled Pinned Locked Moved Unsolved General and Desktop
11 Posts 3 Posters 1.2k 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.
  • H Offline
    H Offline
    Harish Chikkaraju
    wrote on last edited by
    #1

    I was trying to integrate IMAPI2 sources to my qt project , i was getting following linking error.

    error: undefined reference to `IID_IDiscMaster2'

    error: undefined reference to `_GUID const& __mingw_uuidof()'

    All these linker errors are thrown while calling cocreateinstance function which is included from combaseapi.h(linked from mingw path)

    I assume it is something to be a linking error , as i am working on Qt with mingw compiler i am unable to find respective lib file or .a file for this combaseapi.h in qt compiler path.

    I tried adding windows imapi2.dll but it showing file not recognized error while running qmake

    jsulmJ 1 Reply Last reply
    0
    • H Harish Chikkaraju

      I was trying to integrate IMAPI2 sources to my qt project , i was getting following linking error.

      error: undefined reference to `IID_IDiscMaster2'

      error: undefined reference to `_GUID const& __mingw_uuidof()'

      All these linker errors are thrown while calling cocreateinstance function which is included from combaseapi.h(linked from mingw path)

      I assume it is something to be a linking error , as i am working on Qt with mingw compiler i am unable to find respective lib file or .a file for this combaseapi.h in qt compiler path.

      I tried adding windows imapi2.dll but it showing file not recognized error while running qmake

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Harish-Chikkaraju "I was trying to integrate IMAPI2 sources to my qt project " - this is not clear to me. Do you add source code of that library to your project? Or do you use a precompiled version (dll/lib)?

      "I tried adding windows imapi2.dll but it showing file not recognized error while running qmake" - please show your pro file.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      H 1 Reply Last reply
      0
      • jsulmJ jsulm

        @Harish-Chikkaraju "I was trying to integrate IMAPI2 sources to my qt project " - this is not clear to me. Do you add source code of that library to your project? Or do you use a precompiled version (dll/lib)?

        "I tried adding windows imapi2.dll but it showing file not recognized error while running qmake" - please show your pro file.

        H Offline
        H Offline
        Harish Chikkaraju
        wrote on last edited by
        #3

        @jsulm I added header and cpp files to the current Qt Project . and in following way i have added dll to pro
        LIBS+ = ./Libs/imapi2.dll

        after adding dll in this way i am getting below error.

        C:\Sample\Libs\imapi2.dll:-1: error: file not recognized: File format not recognized

        jsulmJ 1 Reply Last reply
        0
        • H Harish Chikkaraju

          @jsulm I added header and cpp files to the current Qt Project . and in following way i have added dll to pro
          LIBS+ = ./Libs/imapi2.dll

          after adding dll in this way i am getting below error.

          C:\Sample\Libs\imapi2.dll:-1: error: file not recognized: File format not recognized

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @Harish-Chikkaraju If you add the library source code there is no need to add the dll. You either do the one or the other, not both.
          "C:\Sample\Libs\imapi2.dll:-1: error: file not recognized: File format not recognized" - most probably the lib was compiled using different compiler than the one you're using. On Windows you can't mix different compilers.

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          H 1 Reply Last reply
          0
          • jsulmJ jsulm

            @Harish-Chikkaraju If you add the library source code there is no need to add the dll. You either do the one or the other, not both.
            "C:\Sample\Libs\imapi2.dll:-1: error: file not recognized: File format not recognized" - most probably the lib was compiled using different compiler than the one you're using. On Windows you can't mix different compilers.

            H Offline
            H Offline
            Harish Chikkaraju
            wrote on last edited by
            #5

            @jsulm yes the imapi2 dll was compiled using msvc compiler which i got from windows sdk.

            I am unable to find the respective lib or .a file for the imapi2 package.

            jsulmJ aha_1980A 2 Replies Last reply
            0
            • H Harish Chikkaraju

              @jsulm yes the imapi2 dll was compiled using msvc compiler which i got from windows sdk.

              I am unable to find the respective lib or .a file for the imapi2 package.

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @Harish-Chikkaraju You should first decide whether you want:

              • Directly add IMAP2 source code to your project
              • Use precompiled version of that library

              You also can compile first IMAP2 library using your compiler and then add it to your project.

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              H 1 Reply Last reply
              0
              • H Harish Chikkaraju

                @jsulm yes the imapi2 dll was compiled using msvc compiler which i got from windows sdk.

                I am unable to find the respective lib or .a file for the imapi2 package.

                aha_1980A Offline
                aha_1980A Offline
                aha_1980
                Lifetime Qt Champion
                wrote on last edited by
                #7

                @Harish-Chikkaraju said in Required Library of Imapi2 for Qt with mingw compiler on windows:

                I am unable to find the respective lib or .a file for the imapi2 package.

                Then you can try to create your own import library: http://www.mingw.org/wiki/CreateImportLibraries

                Another way would still be to load the library dynamically with QLibrary and to resolve the symbols at runtime. That way you are completely compiler independent.

                Regards

                Qt has to stay free or it will die.

                1 Reply Last reply
                0
                • jsulmJ jsulm

                  @Harish-Chikkaraju You should first decide whether you want:

                  • Directly add IMAP2 source code to your project
                  • Use precompiled version of that library

                  You also can compile first IMAP2 library using your compiler and then add it to your project.

                  H Offline
                  H Offline
                  Harish Chikkaraju
                  wrote on last edited by
                  #8

                  @jsulm said in Required Library of Imapi2 for Qt with mingw compiler on windows:

                  Use precompiled version of that lib

                  I have only added wrapper classes and headers to use the API's like CoCreateInstance function to create a instances of IDiscMaster2, IDiscFormat2Data from imapi2 package , i dont have complete source package of imapi2.

                  jsulmJ 1 Reply Last reply
                  0
                  • H Harish Chikkaraju

                    @jsulm said in Required Library of Imapi2 for Qt with mingw compiler on windows:

                    Use precompiled version of that lib

                    I have only added wrapper classes and headers to use the API's like CoCreateInstance function to create a instances of IDiscMaster2, IDiscFormat2Data from imapi2 package , i dont have complete source package of imapi2.

                    jsulmJ Offline
                    jsulmJ Offline
                    jsulm
                    Lifetime Qt Champion
                    wrote on last edited by
                    #9

                    @Harish-Chikkaraju Then you have to possibilities:

                    • Find a binary of that library built using MinGW
                    • Build this library by yourself using your MinGW compiler

                    https://forum.qt.io/topic/113070/qt-code-of-conduct

                    H 1 Reply Last reply
                    2
                    • jsulmJ jsulm

                      @Harish-Chikkaraju Then you have to possibilities:

                      • Find a binary of that library built using MinGW
                      • Build this library by yourself using your MinGW compiler
                      H Offline
                      H Offline
                      Harish Chikkaraju
                      wrote on last edited by
                      #10

                      @jsulm

                      Find a binary of that library built using MinGW - I have an build exe in visual studio with msvc compiler with said wrapper files.

                      Build this library by yourself using your MinGW compiler - Could you suggest a way to do ?

                      jsulmJ 1 Reply Last reply
                      0
                      • H Harish Chikkaraju

                        @jsulm

                        Find a binary of that library built using MinGW - I have an build exe in visual studio with msvc compiler with said wrapper files.

                        Build this library by yourself using your MinGW compiler - Could you suggest a way to do ?

                        jsulmJ Offline
                        jsulmJ Offline
                        jsulm
                        Lifetime Qt Champion
                        wrote on last edited by
                        #11

                        @Harish-Chikkaraju said in Required Library of Imapi2 for Qt with mingw compiler on windows:

                        Could you suggest a way to do

                        You should check the documentation of that library. Usually there is a description how to build the project.

                        https://forum.qt.io/topic/113070/qt-code-of-conduct

                        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