From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11532 invoked by alias); 9 Nov 2004 08:09:58 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 10735 invoked from network); 9 Nov 2004 08:09:22 -0000 Received: from unknown (HELO kecgate03.infosys.com) (220.227.179.21) by sourceware.org with SMTP; 9 Nov 2004 08:09:22 -0000 Received: from INDHUBBHS02.ad.infosys.com ([192.168.200.82]) by kecgate03.infosys.com with InterScan Messaging Security Suite; Tue, 09 Nov 2004 13:34:34 +0530 Received: from mohmsg01.ad.infosys.com ([192.168.122.42]) by INDHUBBHS02.ad.infosys.com with Microsoft SMTPSVC(5.0.2195.6713); Tue, 9 Nov 2004 13:38:45 +0530 Content-Class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: How to specify the library name for an external function Date: Tue, 09 Nov 2004 08:09:00 -0000 Message-ID: <2B721C6525F0D411B1E900B0D0226BDD05622DE6@mohmsg01.ad.infosys.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: From: "Romil_Singla" To: X-OriginalArrivalTime: 09 Nov 2004 08:08:45.0464 (UTC) FILETIME=[55947180:01C4C633] X-SW-Source: 2004-11/txt/msg00032.txt.bz2 I have an application(a shared library in C++) which uses strftime() function of Standard C library. My application is loaded in Iplanet web server as a plugin. As strftime() function is also defined by one of the Iplanet web server libraries, So the strftime() call from my application is getting its definition from web server library rather than standard C library. In a shared environment where the same function is defined by two libraries (e.g. in my case Standard C library and Iplanet Server library), How can I specify my application to a pick the definition from a particular library at run-time ?? -----Original Message----- From: gcc-help-owner@gcc.gnu.org [mailto:gcc-help-owner@gcc.gnu.org] On Behalf Of Sisyphus Sent: Tuesday, November 09, 2004 12:42 PM To: arthur; gcc-help@gcc.gnu.org Subject: Re: How to compile conio.h functions using MINGW arthur wrote: > I have tried to compile some functions in conio.h using and i am using MINGW > and got some error message that told me that there were undefined references > to all of the conio.h functions that i used. > Is there any library that i should specify on the command line? > Please help me. >=20 I did a Windows 'Search' of the MinGW '.a' files for the strings=20 '_cputs' and '_cscanf'. Both searches turned up the following 7 files: libcrtdll.a, libmsvcr70.a, libmsvcr70d.a, libmsvcr71.a, libmsvcr71d.a,=20 libmsvcrt.a, and libmsvcrtd.a. I don't know just which of those you link to ... or if it matters ... or if it's even definite that it has to be one of those files. I'd opt for -lmsvcrt but there's no guarantee that's correct :-) Try a MinGW-specific list if you don't get a satisfactory answer here. Hth. Cheers, Rob