Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Studio
  4. LNK2019 Visual Studio 2012 PROFESSIONAL

LNK2019 Visual Studio 2012 PROFESSIONAL

Scheduled Pinned Locked Moved Visual Studio
csharpc++visual-studio
12 Posts 3 Posters 2 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.
  • F ForNow

    Hi I am using the Following 2 functions WaitOnAddress and WakeByAddressAll They are in the Windows 8.0 SDK. I have nmake project and included both .h header I mean the path and the .lib file synchronization.lib in the VC++ directories 1) include directories 2) Library Directory I did a DUMPBIN /EXPORTS of synchronization.lib and I see the function how come the linker cann't find it

    L Offline
    L Offline
    Lost User
    wrote on last edited by
    #2

    ForNow wrote:

    I see the function how come the linker cann't find it

    Can't find what? What is the exact error message that you see?

    F 1 Reply Last reply
    0
    • L Lost User

      ForNow wrote:

      I see the function how come the linker cann't find it

      Can't find what? What is the exact error message that you see?

      F Offline
      F Offline
      ForNow
      wrote on last edited by
      #3

      Sorry don't know the pretag for the linker but you can see the output thing is I opened up VS command prompt and did DUMPBIN /EXPORT and I can see those functions exported and I did put that .lib library path (its Windows SDK 8.0) in VC++ directories for the library directories

       Creating library msvc.debug.AMD64.obj\\hengine.lib and object msvc.debug.AMD64.obj\\hengine.exp
      

      1>cpu.obj : error LNK2019: unresolved external symbol WaitOnAddress referenced in function s370_process_trace
      1>general1.obj : error LNK2019: unresolved external symbol WakeByAddressAll referenced in function s390_branch_and_save_and_set_mode
      1>msvc.debug.AMD64.bin\hengine.dll : fatal error LNK1120: 2 unresolved externals
      1>NMAKE : fatal error U1077: 'link' : return code '0x460'
      1> Stop.

      L 1 Reply Last reply
      0
      • F ForNow

        Sorry don't know the pretag for the linker but you can see the output thing is I opened up VS command prompt and did DUMPBIN /EXPORT and I can see those functions exported and I did put that .lib library path (its Windows SDK 8.0) in VC++ directories for the library directories

         Creating library msvc.debug.AMD64.obj\\hengine.lib and object msvc.debug.AMD64.obj\\hengine.exp
        

        1>cpu.obj : error LNK2019: unresolved external symbol WaitOnAddress referenced in function s370_process_trace
        1>general1.obj : error LNK2019: unresolved external symbol WakeByAddressAll referenced in function s390_branch_and_save_and_set_mode
        1>msvc.debug.AMD64.bin\hengine.dll : fatal error LNK1120: 2 unresolved externals
        1>NMAKE : fatal error U1077: 'link' : return code '0x460'
        1> Stop.

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #4

        Did you actually include the .lib file in your linker inputs in the project?

        F 1 Reply Last reply
        0
        • L Lost User

          Did you actually include the .lib file in your linker inputs in the project?

          F Offline
          F Offline
          ForNow
          wrote on last edited by
          #5

          It's a nmake project so All I do in the project properties on the left pane is VC++ directories I input the path the lib is in the library directories the thing is I have used other Windows Sdk API however this is in windows SDK 8.0 to I had to download and include the header path and library path after I installed Windows SDK 8.0

          L 1 Reply Last reply
          0
          • F ForNow

            It's a nmake project so All I do in the project properties on the left pane is VC++ directories I input the path the lib is in the library directories the thing is I have used other Windows Sdk API however this is in windows SDK 8.0 to I had to download and include the header path and library path after I installed Windows SDK 8.0

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #6

            I don't know nmake. But somewhere in the nmake file you need to tell the linker which libraries to include. Just giving the path to the directory will not work, it does not scan every file looking for exported functions.

            F 1 Reply Last reply
            0
            • L Lost User

              I don't know nmake. But somewhere in the nmake file you need to tell the linker which libraries to include. Just giving the path to the directory will not work, it does not scan every file looking for exported functions.

              F Offline
              F Offline
              ForNow
              wrote on last edited by
              #7

              Thing is I have added Windows SDK API into this project such as SendMessage to communicate with the windows program I wrote But I think you are right

              L 1 Reply Last reply
              0
              • F ForNow

                Thing is I have added Windows SDK API into this project such as SendMessage to communicate with the windows program I wrote But I think you are right

                L Offline
                L Offline
                Lost User
                wrote on last edited by
                #8

                Well, as I say, the linker will not attempt to guess which .lib file it needs to include.

                F 1 Reply Last reply
                0
                • F ForNow

                  Hi I am using the Following 2 functions WaitOnAddress and WakeByAddressAll They are in the Windows 8.0 SDK. I have nmake project and included both .h header I mean the path and the .lib file synchronization.lib in the VC++ directories 1) include directories 2) Library Directory I did a DUMPBIN /EXPORTS of synchronization.lib and I see the function how come the linker cann't find it

                  D Offline
                  D Offline
                  DanielBrownAU
                  wrote on last edited by
                  #9

                  Going by the page at https://msdn.microsoft.com/en-us/library/windows/desktop/hh706898(v=vs.85).aspx You will need to include Synchronization.lib in the nmake file/settings with the other .lib files (inlcuding the path, im not too up to date with nmake)

                  F 1 Reply Last reply
                  0
                  • D DanielBrownAU

                    Going by the page at https://msdn.microsoft.com/en-us/library/windows/desktop/hh706898(v=vs.85).aspx You will need to include Synchronization.lib in the nmake file/settings with the other .lib files (inlcuding the path, im not too up to date with nmake)

                    F Offline
                    F Offline
                    ForNow
                    wrote on last edited by
                    #10

                    IS there a way to do this with #import directive in the source code

                    L 1 Reply Last reply
                    0
                    • L Lost User

                      Well, as I say, the linker will not attempt to guess which .lib file it needs to include.

                      F Offline
                      F Offline
                      ForNow
                      wrote on last edited by
                      #11

                      I found it in addition to including the path there was LIB = $(LIBS) user32.lib I added synchroninzation.lib the user32.lib allowed me to use SendMessage without a problem thanks

                      1 Reply Last reply
                      0
                      • F ForNow

                        IS there a way to do this with #import directive in the source code

                        L Offline
                        L Offline
                        Lost User
                        wrote on last edited by
                        #12

                        ForNow wrote:

                        IS there a way to do this with #import directive in the source code

                        No, the #import statement imports types from a type library at compile time. You can use the #pragma command as described at: comment (C-C++)[^].

                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • World
                        • Users
                        • Groups