05-10-2009 10:34 PM
I'm attempting to use a third party API with LabWindows/CVI. I'm getting a compile error that indicates "socketaddr_in" is undefined. On Unix/Linux systems this parameter is defined in the "socket.h" include file. I searched my (Windows) system for "socket.h". Nothing is found. Do I have to purchase Visual Studio (or whatever it's called) just to get socket.h (or whatever it's called on Windows)?
I'm spoiled by having this kind of stuff immediately available at no charge on Linux.
Solved! Go to Solution.
05-10-2009 11:50 PM
05-11-2009 10:46 AM
You're correct, I should have typed "sockadd_in" not "socketadd_in". Sorry.
What is "Windows SDK for CVI"? Is it a Microsoft product or an NI product? Should it have been installed when I installed LabWindows/CVI? Or did I miss a step?
I found a seemingly related installer in the following folder on my system. Is this the "Windows SDK for CVI" that you mentioned? I went ahead and ran it. Afterward the "sockaddr_in" problem appears to be gone. I say "appears" to be gone because I've tried so many things that I'm not positive that I have the exact same setup as before. I'm so confused!
C:\National Instruments Downloads\NILWCVIFDS90\Parts\CVI\SDK\
Now the compiler is looking for "winsock2.h". Where do I get that?
05-12-2009 09:32 AM
Querty99,
When you installLabWindows/CVI you will
have the option to install the interface to Win32 API. To get access to
the header files you are looking for make sure to right click the Interface to Win32 API and select Install this feature to a local drive (see the attached screenshot). If installed correctly you should see WinSock2.h in your C:\Program Files\National Instruments\<CVI Version>\sdk\include.