X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-0.3 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org MIME-Version: 1.0 In-Reply-To: <6f7465110909250900l49bd8cebsbd43417b3a1df04c@mail.gmail.com> References: <6f7465110909250900l49bd8cebsbd43417b3a1df04c AT mail DOT gmail DOT com> Date: Fri, 25 Sep 2009 11:06:56 -0500 Message-ID: <6f7465110909250906i5df78351lfaa5e2a9ed4255c@mail.gmail.com> Subject: Re: Unresolved Reference when Linking a C program with GetUserNameEX() From: Paul Lupa To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Hi, The following code does not link because of an undefinded reference. #include #include #include #include #include main() =A0 { =A0 char=A0 data[500]; =A0 DWORD=A0=A0 data_len; =A0 GetComputerNameEx( 1, data, &data_len); =A0 printf("%s\n", data ); =A0 } The routine "GetComputerName()" is available, but not the extended version. Is there a list of what functions are available from=A0 the kernel32.lib=A0= ? I am compiling it with the following line: =A0=A0 gcc=A0=A0 test.c -o test =A0=A0 Should I be using a different compile line?=A0=A0=A0 I can use the GetComputerName() function. Thanks, Paul -- 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