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. Snap7 for siemens control
Forum Update on Monday, May 27th 2025

Snap7 for siemens control

Scheduled Pinned Locked Moved Unsolved General and Desktop
10 Posts 2 Posters 1.1k Views
  • 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.
  • L Offline
    L Offline
    LegendOfYoda
    wrote on last edited by
    #1

    Hi people,

    i'm not software engineer, but my work is actually to create C++ soft to control gantry system (siemens language).

    I use Qt because it's very easy to make user interface, and i know (a little) c++.

    I use snap7 engine too (1.4.2). But i'm locked by an error (i think basic error): "LNK1181: cannot open input file 'snap7.obj'".

    I only put all the cpp,h,def and lib files on my project (Qmake), i don't put any instruction using them. On my realease folder, there are some .obj files, but no any snap7.obj. I don't know how to create it, or use it.

    Can something help me? :D (i can give you screenshoot if you need)

    Thank you very much :-)

    jsulmJ 1 Reply Last reply
    0
    • L LegendOfYoda

      Hi people,

      i'm not software engineer, but my work is actually to create C++ soft to control gantry system (siemens language).

      I use Qt because it's very easy to make user interface, and i know (a little) c++.

      I use snap7 engine too (1.4.2). But i'm locked by an error (i think basic error): "LNK1181: cannot open input file 'snap7.obj'".

      I only put all the cpp,h,def and lib files on my project (Qmake), i don't put any instruction using them. On my realease folder, there are some .obj files, but no any snap7.obj. I don't know how to create it, or use it.

      Can something help me? :D (i can give you screenshoot if you need)

      Thank you very much :-)

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

      @LegendOfYoda Can you show your pro file and complete build log?

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

      1 Reply Last reply
      0
      • L Offline
        L Offline
        LegendOfYoda
        wrote on last edited by
        #3

        Hi @jsulm , thank you for your answer, there are the screens: (i only hide the name of my project because it's for my work)

        0_1559898446685_Project.PNG 0_1559898458988_Logs.PNG

        jsulmJ 1 Reply Last reply
        0
        • L LegendOfYoda

          Hi @jsulm , thank you for your answer, there are the screens: (i only hide the name of my project because it's for my work)

          0_1559898446685_Project.PNG 0_1559898458988_Logs.PNG

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

          @LegendOfYoda Why do you have LIBS += snap7 if you already added its source code files directly?
          Either build snap7 as lib and add the lib to your project or remove LIBS += snap7

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

          1 Reply Last reply
          2
          • L Offline
            L Offline
            LegendOfYoda
            wrote on last edited by LegendOfYoda
            #5

            I tryed many thinks. If i remove only LIBS += snap7, i got the same issue, without .obj:

            "LNK1104: cannot open file '..\XXX_Controler\snap7'"

            jsulmJ 1 Reply Last reply
            0
            • L LegendOfYoda

              I tryed many thinks. If i remove only LIBS += snap7, i got the same issue, without .obj:

              "LNK1104: cannot open file '..\XXX_Controler\snap7'"

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

              @LegendOfYoda Try to remove DEF_FILE

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

              1 Reply Last reply
              0
              • L Offline
                L Offline
                LegendOfYoda
                wrote on last edited by
                #7

                i got another kind of issue:
                0_1559902362482_Logs.PNG

                I'm really inexperimented i can be very basic error from me! :/

                jsulmJ 1 Reply Last reply
                0
                • L LegendOfYoda

                  i got another kind of issue:
                  0_1559902362482_Logs.PNG

                  I'm really inexperimented i can be very basic error from me! :/

                  jsulmJ Online
                  jsulmJ Online
                  jsulm
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  @LegendOfYoda Does the file shown in the first line exist?
                  Remember that after changing pro file you need to run qmake first. Safest is to delete the build directory and then build again.

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

                  1 Reply Last reply
                  0
                  • L Offline
                    L Offline
                    LegendOfYoda
                    wrote on last edited by
                    #9

                    Yes, i always clear - Qmake-build, and sometimes delete theses folders.

                    After doing tis, without .def,and without .lib, i got this kind of error:
                    0_1559907371235_Logs.PNG

                    (more than 130 issues)

                    I think .def is necessary, or an equivalent.

                    1 Reply Last reply
                    0
                    • L Offline
                      L Offline
                      LegendOfYoda
                      wrote on last edited by
                      #10
                      This post is deleted!
                      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