CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2011
    Posts
    3

    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.

  2. #2
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,620

    Re: Can't compile netapi32.dll functions (Windows API)

    Is it necessary to install the SDK for these calls to work?
    Yes, this is exactly what you need, Platform SDK.
    Best regards,
    Igor

  3. #3
    Join Date
    Sep 2011
    Posts
    3

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured