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. I added a .lib file and calling object problem
Forum Updated to NodeBB v4.3 + New Features

I added a .lib file and calling object problem

Scheduled Pinned Locked Moved Solved General and Desktop
15 Posts 2 Posters 2.0k 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.
  • Z ZekDe

    Hmm,no dll ,I didnt add it because I dont know how can I do it,where will I put it in project

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

    @ZekDe
    Hi
    The lib file describes what symbols (code) that is visible. (or whole lib)
    The DLL contains the actual binary code.
    Always keep them together.
    So where u point the .pro file should contain the DLL also.
    You dont add the .dll to the project. its loaded runtime.

    1 Reply Last reply
    2
    • Z Offline
      Z Offline
      ZekDe
      wrote on last edited by
      #5

      What I do is snap7.cpp,snap7.h,snap7.lib is in project ,I linked the .lib and I didnt add the snap7.cpp and snap7.h already program handled it as far as I understand.

      mrjjM 1 Reply Last reply
      0
      • Z ZekDe

        What I do is snap7.cpp,snap7.h,snap7.lib is in project ,I linked the .lib and I didnt add the snap7.cpp and snap7.h already program handled it as far as I understand.

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

        @ZekDe

        Hi
        Where is the dll?
        when you compiled the project, it didnt make a dll?
        This is ULTRA important

        1 Reply Last reply
        1
        • Z Offline
          Z Offline
          ZekDe
          wrote on last edited by
          #7

          Hmm,when the download the folders in snap7 webside,They came with together .dll and .lib also .cpp and .h ,but when I add the .cpp,.h,.lib I didnt get any dll in runtime because I cannot compile because of mistake

          1 Reply Last reply
          0
          • Z Offline
            Z Offline
            ZekDe
            wrote on last edited by
            #8

            I suppose I have to use dll coming with download ,am I right,also additional ,I tried src files all sources codes to compile but in this time program cannot find a xxxx.h as a result again I had a problem

            1 Reply Last reply
            0
            • Z Offline
              Z Offline
              ZekDe
              wrote on last edited by
              #9

              When I went to home ,I will send .pro file İF you would like ,all project file

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

                Hi
                so you never ran the .bat file to build the lib?

                1 Reply Last reply
                0
                • Z Offline
                  Z Offline
                  ZekDe
                  wrote on last edited by
                  #11

                  No,I didnt

                  1 Reply Last reply
                  0
                  • Z Offline
                    Z Offline
                    ZekDe
                    wrote on last edited by
                    #12

                    Well ,how can I src folders,probably this is better to use but I have a mistake with it .cannot find snap_threads.h but it is there

                    mrjjM 1 Reply Last reply
                    0
                    • Z ZekDe

                      Well ,how can I src folders,probably this is better to use but I have a mistake with it .cannot find snap_threads.h but it is there

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

                      @ZekDe
                      Hi
                      Add the .h and .cpp files
                      Adjust
                      INCLUDEPATH += to include those locations where .h files can be found.

                      1 Reply Last reply
                      0
                      • Z Offline
                        Z Offline
                        ZekDe
                        wrote on last edited by
                        #14

                        @mrjj said in I added a .lib file and calling object problem:

                        Adjust
                        INCLUDEPATH += to include those locations where .h files can be found.

                        Hi

                        ![alt text](0_1516209750125_766fe804-8f83-4180-b23d-0be25ecb5e05-image.png image url)

                        1 Reply Last reply
                        0
                        • Z Offline
                          Z Offline
                          ZekDe
                          wrote on last edited by
                          #15

                          Ok it is solved.

                          win32:LIBS += C:\Qt\Tools\mingw530_32\i686-w64-mingw32\lib\libws2_32.a
                          win32:LIBS += C:\Qt\Tools\mingw530_32\i686-w64-mingw32\lib\libwinmm.a

                          but Why I dont know,

                          1 Reply Last reply
                          1

                          • Login

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