Can't compile netapi32.dll functions (Windows API)
Hi. Whenever I try to compile Network Management functions of windows api, like NetWkstaSetInfo or NetShareEnum, I receive a build error like "undefined reference to 'NetWkstaSetInfo@16' ". The @16 always comes appended to the function name, maybe it refers to 16-bits versions?
The _WIN32_WINNT constant have already been set to 0x500 and a #pragma comment(lib, "netapi32.lib") line inserted, but none solved my problem. By the way, I searched my computer for the netapi32.lib file and couldn't find it. Is it necessary to install the SDK for these calls to work? I can use windows.h and call many Windows API functions already.
I'm using Code::Blocks IDE (mingw compiler).
Thanks in advance.
Re: Can't compile netapi32.dll functions (Windows API)
Quote:
Is it necessary to install the SDK for these calls to work?
Yes, this is exactly what you need, Platform SDK.
Re: Can't compile netapi32.dll functions (Windows API)
Thanks for the reply. Installing the SDK and linking the netapi32.lib library solved the problem.