# LabWindows/CVI

cancel
Showing results for
Did you mean:

## How do I compile LW/CVI application using winsock2 SDK from Microsoft?

I'm using CVI 5.0.1, linking with ws2_32.lib and providing the include path to the winsock2 header files. Still getting winsock2.h errors, link errors.
Message 1 of 6
(3,997 Views)

## Re: How do I compile LW/CVI application using winsock2 SDK from Microsoft?

I don't have problem using winsock library, but I am using CVI6.0

In my C file, the order of include files is

winodws.h
winsock2.h
Includes.h (all my CVI inlclude files)

the ....CVI\sdk\include path is added under "Include Paths" option

ws2_32.lib is added to the Project from CVI\sdk\lib folder.

Hope it helps.

vishi

"fermenter" wrote in message
news:506500000008000000B9810000-1042324653000@exchange.ni.com...
> I'm using CVI 5.0.1, linking with ws2_32.lib and providing the include
> path to the winsock2 header files. Still getting winsock2.h errors,
Message 2 of 6
(3,997 Views)

## Re: How do I compile LW/CVI application using winsock2 SDK from Microsoft?

Hello,
Please make sure that you are using the Win32 SDK support that ships with LW/CVI. If you don't have it already installed, you can perform a custom installation and manually add the support for Win32 SDK. Once you have the support installed, you don't have to explicitly specify the directory in the include path. However, you have to add the library file in your CVI project in order to link your files correctly.

Mika Fukuchi
Application Engineer
National Instruments
Message 3 of 6
(3,997 Views)

## Re: How do I compile LW/CVI application using winsock2 SDK from Microsoft?

In my CVI 6.0 installation, i don't have W2_32.lib, from where i can get it?

Message 4 of 6
(3,661 Views)

## Re: How do I compile LW/CVI application using winsock2 SDK from Microsoft?

If you have the Full Development System (FDS) of CVI, then you need to rerun the installer, and when you get to the feature tree, make sure that you enable the LabWindows/CVI>>Win32 SDK feature.

If, on the hand, you have the Base version of CVI, then I'm afraid you're out of luck. These additional SDK files are one of the differences between Base and FDS.

Luis
Message 5 of 6
(3,641 Views)

## Re: How do I compile LW/CVI application using winsock2 SDK from Microsoft?

Thanks LuisG
I think i have to reinstall my CVI and try again.
Vishnu
Message 6 of 6
(3,591 Views)