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. Building a 3rd party lib
Forum Updated to NodeBB v4.3 + New Features

Building a 3rd party lib

Scheduled Pinned Locked Moved Solved 3rd Party Software
7 Posts 3 Posters 1.6k 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.
  • ODБOïO Offline
    ODБOïO Offline
    ODБOï
    wrote on last edited by ODБOï
    #1

    Hi,
    I'm trying to build this library to use it with my Qt 5.15 - mingw kit

    The lib is called QAds, it is a qt wrapper for Beckhoff ADS library that allows communication with Beckhoff PLCs.

    when i try to built it, i get

    ....\QAds/include/tc3manager.h:18:10: fatal error: TcAdsDef.h: No such file or directory

    source file (tc3manager.h )

    #ifdef __linux__
    #include "AdsDef.h"
    #define __stdcall
    #elif _WIN32
    #include <TcAdsDef.h>
    #include <TcAdsAPI.h>
    #else
    #endif
    

    so i went in the librarys .pro file :

    INCLUDEPATH += $$PWD/lib/ADS/AdsLib
    
        SOURCES += \
            lib/ADS/AdsLib/AdsDef.cpp \
    ...
    

    there is in fact a folder called lib in the project folder but it is empty, so i simply cloned the original Beckhoff ADS there,
    now INCLUDEPATH and SOURCES look good but if i try to build again, i still have the same error
    Does someone know how to solve this please ?

    Thank you

    jsulmJ 1 Reply Last reply
    0
    • ODБOïO ODБOï

      Hi,
      I'm trying to build this library to use it with my Qt 5.15 - mingw kit

      The lib is called QAds, it is a qt wrapper for Beckhoff ADS library that allows communication with Beckhoff PLCs.

      when i try to built it, i get

      ....\QAds/include/tc3manager.h:18:10: fatal error: TcAdsDef.h: No such file or directory

      source file (tc3manager.h )

      #ifdef __linux__
      #include "AdsDef.h"
      #define __stdcall
      #elif _WIN32
      #include <TcAdsDef.h>
      #include <TcAdsAPI.h>
      #else
      #endif
      

      so i went in the librarys .pro file :

      INCLUDEPATH += $$PWD/lib/ADS/AdsLib
      
          SOURCES += \
              lib/ADS/AdsLib/AdsDef.cpp \
      ...
      

      there is in fact a folder called lib in the project folder but it is empty, so i simply cloned the original Beckhoff ADS there,
      now INCLUDEPATH and SOURCES look good but if i try to build again, i still have the same error
      Does someone know how to solve this please ?

      Thank you

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

      @LeLev said in Building a 3rd party lib:

      i still have the same error

      Did you rerun qmake?
      From the readme: "This repository is using https://github.com/Beckhoff/ADS as submodule". So, should be enough to do "git submodule init" and "git submodule update".

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

      ODБOïO 1 Reply Last reply
      2
      • jsulmJ jsulm

        @LeLev said in Building a 3rd party lib:

        i still have the same error

        Did you rerun qmake?
        From the readme: "This repository is using https://github.com/Beckhoff/ADS as submodule". So, should be enough to do "git submodule init" and "git submodule update".

        ODБOïO Offline
        ODБOïO Offline
        ODБOï
        wrote on last edited by ODБOï
        #3

        hi, thank you for answering
        @jsulm said in Building a 3rd party lib:

        Did you rerun qmake?

        yes i did rerun qmake.

        @jsulm said in Building a 3rd party lib:

        So, should be enough to do "git submodule init" and "git submodule update".

        I didn't knew these commands honestly.
        I tryed, it cloned the Beckhoff ADS project in the lib folder
        but unfortunattely i still have the same error when i try to run mingw32-make

        If i open the project with QtCreator and go to the file where the error is, i see qt creator warnings on the include lines :
        //tc3manager.h

        #elif _WIN32
        #include <TcAdsDef.h>  // file not found 
        #include <TcAdsAPI.h> // file not found
        

        but if i go to the .pro everything looks ok

        SOURCES += \
               lib/ADS/AdsLib/AdsDef.cpp \
        
        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi,

          Did you saw that the main QAdd .pro file has a unix scope ?

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

          ODБOïO 1 Reply Last reply
          1
          • SGaistS SGaist

            Hi,

            Did you saw that the main QAdd .pro file has a unix scope ?

            ODБOïO Offline
            ODБOïO Offline
            ODБOï
            wrote on last edited by
            #5

            Hi
            @SGaist said in Building a 3rd party lib:

            Did you saw that the main QAdd .pro file has a unix scope ?

            No, but i'm not sure what does that mean, Could you please clarify ?
            Does that mean it is meant to be built on Linux ?

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              It means that what's between the curly brackets apply only to Unix like OS like Linux and macOS.

              Since you are building on Windows, that part is going to be ignored.

              If you want to try to build that stuff on Windows, remove the scope. You will likely have to do coding depending on what errors you'll get while building the project (with some luck it might just succeed).

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

              ODБOïO 1 Reply Last reply
              1
              • SGaistS SGaist

                It means that what's between the curly brackets apply only to Unix like OS like Linux and macOS.

                Since you are building on Windows, that part is going to be ignored.

                If you want to try to build that stuff on Windows, remove the scope. You will likely have to do coding depending on what errors you'll get while building the project (with some luck it might just succeed).

                ODБOïO Offline
                ODБOïO Offline
                ODБOï
                wrote on last edited by
                #7

                @SGaist said in Building a 3rd party lib:

                It means that what's between the curly brackets apply only to Unix like OS like Linux and macOS.
                Since you are building on Windows, that part is going to be ignored.

                Yes i got it,
                my bad for not noticing that

                Thank you.

                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