public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* How to specify the library name for an external function
@ 2004-11-09  8:09 Romil_Singla
  0 siblings, 0 replies; only message in thread
From: Romil_Singla @ 2004-11-09  8:09 UTC (permalink / raw)
  To: gcc-help


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.
> 

I did a Windows 'Search' of the MinGW '.a' files for the strings 
'_cputs' and '_cscanf'. Both searches turned up the following 7 files:
libcrtdll.a, libmsvcr70.a, libmsvcr70d.a, libmsvcr71.a, libmsvcr71d.a, 
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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-11-09  8:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-09  8:09 How to specify the library name for an external function Romil_Singla

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).