[OCLUG-devel] Runtime Libraries

Doug Jolley ddjolley at gmail.com
Mon Sep 12 17:59:35 PDT 2005


> 
> 
> 
> 
> > Doug, I might have my terminology mixed up, but I think that when you
> > compile something even as simple as hello world, at least on Linux (and
> > I'm sure most other *NIX variants), you're using a runtime library
> (glibc on Linux.)


Really. James, I'm certainly not saying that you're wrong; but, that would 
be news to me. 

> All you need to do is include the header file for
> crypt and use the functions it provides and the compiler will take
> care
> of dynamically linking the executable for you.

You have said a couple of things that interest me a lot. First, I've always 
wondered why it is that I can just include a header file and I seem to get 
the result that the whole library is included. Are you saying that glibc is 
automatically included? If so are there other libraries that are also 
automatically included? Actually, I was beginning to believe that it was the 
C Standard Library that was
automatically included.

The other thing is that I don't think that crypt is part of glibc. Does that 
have any effect on what you're saying?

Finally, I tried your suggestion of adding a compiler option -llibcrypt. The 
result was a compiler complaint that llibcrypt couldn't be found. The fact 
that the 'l' flag was included in the complaint concerns me (i.e., why it 
should be looking for llibcrypt instead of just libcrypt baffles me.)

I think that if I could somehow improve my understanding of libraries my 
whole C experience would be ratcheted up a level. Unfortunately, it seems to 
be a topic that most text book authors seem to want to avoid. (Maybe they 
don't understand it either. :) )

Anyway, thanks for the input.

... doug
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://localhost.localdomain/pipermail/oclug-devel/attachments/20050912/7bf4de91/attachment.html 


More information about the OCLUG-devel mailing list