Rosetta Code:Village Pump/Works with against libheader

From Rosetta Code
Revision as of 15:47, 12 February 2009 by rosettacode>Mwn3d (Explanation of difference)

Going through some Obj-C codes given by someone else I've added the works with template, since all the examples always use a OpenStep (likely Cocoa, but works almost always on GNUstep too) framework. When I've found already a "works with Objective version 2.0+" notice, a dilemma came into my mind: which is the exact difference (in this case) between Works With and Libheader?! From a point of view, GNUstep (and Cocoa) is (are) a (set of) library(ies), built "upon" Obj-C OO mechanisms / runtime. So it seems Libheader can apply (in fact we must specify #import <Cocoa/Cocoa.h> or #import <Foundation/Foundation.h> and so on... and when compiling, we need linking properly with that framework. But Works With too... being this maybe more generic? Or should Works with be kept for language versions, operating systems, or implementations, and Libheader for libraries? (And in this case, I should go back changing WorksWith with Libheader in all GNUstep/Cocoa cases?)...

I am a little bit confused on the exact use of the two templates in object. --ShinTakezou 15:24, 12 February 2009 (UTC)

The libheader template actually puts the task in the library's category. The works with template just marks which compiler, interpreter, language version, or implementation the code works under. So the libheader should be used for libraries so that the library categories are updated and the works with template should be used for everything else. --Mwn3d 15:47, 12 February 2009 (UTC)