I don't plan to add such feature. Simply nothing 
shows that the minimal benefit it gives can outweigh 
the many and severe problems with any of the current 
implementations I can see at the moment.

'#pragma library' works on the linker level, and 
it's very limited (= dumb) solution. First it cannot 
be used in an environment where there is no linker, 
second there are packages which consist of multiple 
physical libs, not to mention headers, special package 
options and whatnot, and with such pragma you only 
control a small subset of settings in a limited way 
(f.e. user will still have to take care about -I 
option and -gui, just to give two common option), 
so it's much convenient to use .hbc file.

If it doesn't work on the linker level, hbmk2 
will need to step forward as a source code parser, 
which breaks layering, introduces yet another control 
syntax, gets performance hit and gets several other 
deeper complications as a consequence of the former.

In the future we may introduce new concept 
   '#package "hbct"' (or '#using "hbct"')
   (where "hbct" refers to an .hbc file)
which could solve the whole problem domain 
in a modern, simple and elegant way, but 
this needs much closer interaction between 
compiler and build tool.

For now, exploit the power of .hbc files first 
to achieve almost the same effect, and revisit 
this path if some real problem still persist.

Brgds,
Viktor

On 2010 Mar 21, at 20:56, Massimo Belgrano wrote:

> i agree with pete point of view
> It describe a real problem for occasional harbour developer
> 
> I add to my list on this argument also the xbase++   preprocessor
> directive:  #pragma library ("mylib.lib")
> Unfortunately due to portability such feature cannot be added to
> Harbour because it may work only with some subset of supported by
> Harbour C
> compilers and practice shows that such non portable features create
> much more troubles then resolve problems
> http://www.mail-archive.com/harbour@harbour-project.org/msg20832.html
> 
> Hi hope that evolution of c compiler will support this feature
> 
> 
> 
> 2010/3/17 pete_westg <pete_we...@yahoo.gr>:
>> στις 17/03/2010 18:18, O/H Viktor Szakáts έγραψε:
>>> 
>>> The rest would need hbmk2 to parse all source files for
>>> make options, which would in turn have a rather huge speed
>>> penalty. Plus it'd need a 3rd kind of option syntax to
>>> maintain (above existing .hbp and .hbc).
>> 
>> No, in no way I did mean to parse all source files. And i fully agree that
>>  that should be a very good "chance" of troubles like those you are
>>  describe.
>> My thought was of a very few or even one line *on top of main.prg only* in
>> the form :
>> 
>> #using "this lib list", "/and that switch list".
>> 
>> I can think some good reasons for implementing this feature (readability,
>> flexibility, testability, security,  etc.) but if it's so much and complex
>> work to be done then we can forget it. -no doubt, you are the
>> chief-programmer here! ;-)
>> 
>> 
>> regards,
>> 
>> ---
>> Pete
>> 
>> 
> 
> -- 
> Massimo Belgrano
> _______________________________________________
> Harbour mailing list (attachment size limit: 40KB)
> Harbour@harbour-project.org
> http://lists.harbour-project.org/mailman/listinfo/harbour

_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to