Compiling with netapilib

Yaakov (Cygwin/X) yselkowitz@users.sourceforge.net
Mon Jul 20 02:34:00 GMT 2009


On 19/07/2009 13:13, Ian Puleston wrote:
> I'm trying to use gcc 3.4.4 to compile the Microsoft C sample at
> http://msdn.microsoft.com/en-us/library/aa370663(VS.85).aspx to build a
> small test program that makes the "NetWkstaGetInfo" Windows NetAPI
> request. The Cygwin gcc library includes a libnetapi32.a library that
> seems to include that function (see below) but linking with it gives an
> "undefined reference to `_NetWkstaGetInfo@12'" error. Any idea what I am
> missing - is there some other library that I need to link in too?
>
> [Temp]: gcc -l netapi32 -o winTst2.exe winTst2.c

http://cygwin.com/faq/faq-nochunks.html#faq.programming.win32-api


Yaakov

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list