LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

GetAdaptersAddresses undeclared identifier

Solved!
Go to solution
Hi, I'm having a problem calling a Windows API function GetAdaptersAddresses in LabWindows/CVI 8.5.  I'm getting a compiler error "undeclared identifier PIP_ADAPTER_ADDRESSES" even though I have included the winsock2.h and iphlpapi.h.  After reading the internet it appears the linker error is unrelated to the include files but I need to add iphlpapi.lib to the list of modules I link against.  In Visual Studio, that would be Project | Properties | Linker | Input | Additional Dependencies.  How do you do this in LabWindows/CVI?  My iphlpapi.lib is already included in the project.  Thank you.
0 Kudos
Message 1 of 4
(6,849 Views)

Try going to the Build menu and Target Settings.  Then click on Add Files to Executable.  Your .lib file should show up the list.  Select it and press ok, and see if that gets rid of your linker errors.

 

-Christina

0 Kudos
Message 2 of 4
(6,813 Views)
Solution
Accepted by topic author icu

icu,

 

The problem you're having is that the Windows SDK that comes with CVI 8.5 is too old to include a definition for PIP_ADAPTER_ADDRESSES. You'll have to upgrade to the FDS version of CVI 9.0 or later in order to get a more up-to-date SDK. Once you do, simply including winsock2.h and iphlpapi.h in your program should be sufficient.

 

Luis

0 Kudos
Message 3 of 4
(6,793 Views)
Thank you all for your replys.  Luis is right. CVI 8.5 SDK iphlpapi.h does not have the GetAdaptersAddresses defined.  I copied the file from Visual Studio and it's building correctly now.  Thank you all.
0 Kudos
Message 4 of 4
(6,785 Views)