X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 	tests=AWL,BAYES_00,SPF_PASS
X-Spam-Check-By: sourceware.org
Message-ID: <4A636C93.2090809@users.sourceforge.net>
Date: Sun, 19 Jul 2009 13:57:23 -0500
From: "Yaakov (Cygwin/X)" <yselkowitz@users.sourceforge.net>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1b3pre) Gecko/20090223 Thunderbird/3.0b2
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: Compiling with netapilib
References: <3A64AD910BEC5B438CE38CA499168FFE03F0ABA7@US0EXB07.us.sonicwall.com>
In-Reply-To: <3A64AD910BEC5B438CE38CA499168FFE03F0ABA7@US0EXB07.us.sonicwall.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

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

