some terminology questions.

Wim

Registered
Hi,

I am a programmer (Cobol, RPG) that was originally schooled in Pascal. For job reasons I recently learned myself C programming. (I have to confess it changed my negative attitude towards that language into a positive one; after some sweating:) However, I find myself having trouble with getting knowledge of 'libraries' and 'frameworks'. I do grasp the concepts (I guess) of both but I do not know how to aquire knowledge about building them or using them.
I end up in PB with a nice program and that is all but if I have two or more programs I f.i. don't know how to invoke one from the other. I suppose libraries and frameworks can help me with this and then help me organise programs just as I can organise functions within .c 'modules'.
Does anyone have some suggestions on literature that explains these concepts in a way that enables me to get the full grasp? I would like to get this knowledge to be able to access the cocao and carbon frameworks but also to get a feel for these concepts on other platforms.

Your suggestions are highly apreciated.
Wim
 
A static library(.lib) is a bunch of code which is usually related to a certain functionality, and is compiled into object code(not binary) which you can link into your binary program at compile time and use in your program.

This is usually some utility code such as a library to access a database easier than any API functions, that someone has provided. The library is an easy way to distribute this functionality without sending someone the source code. The person can still use the functions in the library and all they need is the header file defining what's contained in that library.

A framework is different in a way. You can think of a framework as an application skelleton. It's the building blocks of your entire application(Cocoa, Carbon etc).

You will use the Cocoa framework no matter what Cocoa program you are writing(be it in Objective-C or Java). You will need to make calls the the Cocoa framework.

Hopefully that's somewhat clear :)
 
Too extend the Captain's message...

Libraries, frameworks, and executables are very similar.

A library is a set of compiled source code. It has a set of symbols (function names and global variables) defined that can be called from another library or executable. An Application Programming Interface (API) is created (header files in C/C++) for the library so new source code can compile and link to the library.

A framework is a MacOSX package (folder that looks like a file) that contains zero or more libraries, their header files, and any other resources required (like icons). It is a superset of a library.

Finally an executable is a library complied specifically to be executed. It has one entry point the OS uses to create the process ("main" in C/C++).

In MacOSX, GUI applications are frameworks where one of its libraries was compiled to be an executable and the package resources specifies whet to launch.
 
Back
Top