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. error: LNK1120: 1 unresolved externals
Forum Updated to NodeBB v4.3 + New Features

error: LNK1120: 1 unresolved externals

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 2 Posters 687 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.
  • EngelardE Offline
    EngelardE Offline
    Engelard
    wrote on last edited by
    #1

    Hi. I'm trying to follow that simple example:
    http://amin-ahmadi.com/2015/11/14/how-to-use-system-wide-hotkeys-in-your-qt-application/
    Everything good except line with RegisterHotKey function. It gives some error which i can not even comprehend...

    Can anybody help please?
    alt text

    1 Reply Last reply
    0
    • EngelardE Engelard

      @mrjj ofc i did that. That is the point, i followed every step from that example and it gave me this err.

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

      @Engelard
      what compiler ?
      just tried with mingw and it just worked.

      sorry missed the link before :)

      update:
      tried with visual studio also and it works.

      So try to completely delete you build and try again - it should work.

      test project
      https://www.dropbox.com/s/dgz9flueqhu4dkc/winHotkey.zip?dl=0

      EngelardE 1 Reply Last reply
      3
      • mrjjM Offline
        mrjjM Offline
        mrjj
        Lifetime Qt Champion
        wrote on last edited by
        #2

        Hi
        Its a windows API call so you need to link its DLL

        try with
        LIBS += -lUser32
        in your pro file and rebuild all.

        EngelardE 1 Reply Last reply
        3
        • mrjjM mrjj

          Hi
          Its a windows API call so you need to link its DLL

          try with
          LIBS += -lUser32
          in your pro file and rebuild all.

          EngelardE Offline
          EngelardE Offline
          Engelard
          wrote on last edited by
          #3

          @mrjj ofc i did that. That is the point, i followed every step from that example and it gave me this err.

          mrjjM 1 Reply Last reply
          0
          • EngelardE Engelard

            @mrjj ofc i did that. That is the point, i followed every step from that example and it gave me this err.

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

            @Engelard
            what compiler ?
            just tried with mingw and it just worked.

            sorry missed the link before :)

            update:
            tried with visual studio also and it works.

            So try to completely delete you build and try again - it should work.

            test project
            https://www.dropbox.com/s/dgz9flueqhu4dkc/winHotkey.zip?dl=0

            EngelardE 1 Reply Last reply
            3
            • mrjjM mrjj

              @Engelard
              what compiler ?
              just tried with mingw and it just worked.

              sorry missed the link before :)

              update:
              tried with visual studio also and it works.

              So try to completely delete you build and try again - it should work.

              test project
              https://www.dropbox.com/s/dgz9flueqhu4dkc/winHotkey.zip?dl=0

              EngelardE Offline
              EngelardE Offline
              Engelard
              wrote on last edited by
              #5

              @mrjj said in error: LNK1120: 1 unresolved externals:

              So try to completely delete you build and try again

              It sounds so ridiculous, but it works)
              Such bugs of this framework makes me sad. I for the whole day was thinking what's wrong with me...

              mrjjM 1 Reply Last reply
              0
              • EngelardE Engelard

                @mrjj said in error: LNK1120: 1 unresolved externals:

                So try to completely delete you build and try again

                It sounds so ridiculous, but it works)
                Such bugs of this framework makes me sad. I for the whole day was thinking what's wrong with me...

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

                @Engelard said in error: LNK1120: 1 unresolved externals:

                Such bugs of this framework makes me sad. I for the whole day was thinking what's wrong with me...

                Its not a bug in a technical sense.
                But it would be nice if qmake would recreate ALL of the make file when you change the .pro file or at least ask.

                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