PDA

View Full Version : What is a framework?




vgoklani
Apr 26, 2006, 07:52 PM
I use the following command to link my C++ source code to the apple implementation of CLAPACK:

g++ -o code code.cpp -framework veclib

but what is a framework?



savar
Apr 26, 2006, 09:35 PM
I use the following command to link my C++ source code to the apple implementation of CLAPACK:

g++ -o code code.cpp -framework veclib

but what is a framework?

I don't know the dictionary definition, but a framework is usually a collection of libraries and the headers that declare the interfaces.

NewbieNerd
Apr 26, 2006, 10:14 PM
I think a framework, at least on some level, is comparable to a Windows DLL, or dynamically linked library. Such a library exists as only one copy in memory, at least for the code segment of it, as opposed to statically linked libraries which are copied with every applicatioin that uses it. Though DLLs aren't completely better, they tend to be as you can update the DLLs and all programs depending on them see the benefit without any recompiling/relinking.

So when you include NSObject.h in a file and compile, linking to the Foundation framework, you are just using the copy of NSObject.c already in memory instead of making another copy.

Maybe a framework is completely different, hehe, but at least you know what a DLL is. :p

jeremy.king
Apr 27, 2006, 03:51 PM
ADC is always a good resource.

http://developer.apple.com/documentation/MacOSX/Conceptual/BPFrameworks/index.html?http://developer.apple.com/documentation/MacOSX/Conceptual/BPFrameworks/Concepts/WhatAreFrameworks.html#//apple_ref/doc/uid/20002303