error LNK 2019

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lizjaja
    New Member
    • Feb 2008
    • 1

    error LNK 2019

    hye,

    i'm very new to object oriented programming.i dont know why i get this error LNK 2019.I'm using VB2005 using MFC dialog based with a static library.
    i'm trying to use SetupDiGetClass Dev to get the device information set.i've already get to implement the function,howeve r there's problem with the linking part.it appears this in the output box:

    1>Linking...
    1>THIRD.obj : error LNK2019: unresolved external symbol __imp__SetupDiG etClassDevsW@16 referenced in function "void __cdecl `dynamic initializer for 'hardwareDevice Info''(void)" (??__EhardwareD eviceInfo@@YAXX Z)
    1>C:\Documents and Settings\nmoham 5\Desktop\THIRD \Debug\THIRD.ex e : fatal error LNK1120: 1 unresolved externals

    This is the code that i wrote,if i comment out this line.it will compiles and link perfectly:

    HDEVINFO hardwareDeviceI nfo = SetupDiGetClass Devs(&Audio_IoC TL,NULL,NULL,DI GCF_PRESENT|DIG CF_DEVICEINTERF ACE);

    here are the library that i include in order for the compiler to compiles perfectly:

    #include <InitGuid.h>
    #include <winnt.h>
    #include <Setupapi.h>

    What should i do next to eliminate this error?i'm very new to this environment,so please bear with me.
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    Question moved to .net forum.

    Comment

    Working...