|Help a newbie understand how to create a "native library" for any new email@example.com (rdc02271) (2005-05-14)|
|Re: Help a newbie understand how to create a "native library" for any firstname.lastname@example.org (2005-05-14)|
|Re: Help a newbie understand how to create a "native library" for any email@example.com (Skandinavisches Seminar) (2005-05-14)|
|Re: Help a newbie understand how to create a "native library" for any firstname.lastname@example.org (2005-05-15)|
|From:||"Skandinavisches Seminar" <email@example.com>|
|Date:||14 May 2005 22:00:04 -0400|
|Posted-Date:||14 May 2005 22:00:03 EDT|
"rdc02271" <firstname.lastname@example.org> schrieb im Newsbeitrag
> Can any of you show me an example of what would be the perfect
> solution for the libraries problems?
Sorry, there's usually no such thing as a perfect solution.
I recommend the book _Linkers and Loaders_ by John R. Levine (the
moderator of this newsgroup) and the documentation of GNU Libtool:
http://www.gnu.org/software/libtool/libtool.html. You might want to
take a look at the relevant chapters in Kernighan and Ritchie, _The C
Programming Language_ and Stroustrup, _The C++ Programming Language_.
This will give you a clearer idea of what libraries are. You could
also take a look at the source code of the GNU implementations of the
C and C++ standard libraries.
Generally speaking, a library for C will be written in C, a library
for C++ in C++, etc. Assembler is platform-specific, so it's not a
good choice for code that's intended to be ported to other systems.
It's best suited for platform-specific optimizations, not for large
> When you create a new langauge like D how do you create the
> libraries to work with the operating system (for instance Windows) ?
I can't help you with Windows, but in Unix-like systems, the operating
system provides so-called "system calls" in order to make it possible
for programs to communicate with the operating system.
Implementations of C provide functions that map to these system calls,
so that programmers can access them from their programs. 'creat',
'fork', 'exec', 'read' and 'write' are such system calls. The C
standard does not specify what they do, since they may differ from
system to system.
Return to the
Search the comp.compilers archives again.