On Sat, 11 Oct 2008, Szak�ts Viktor wrote:

Hi Viktor,

> BTW, for this problem, IMO a Harbour switch would
> be the best candidate (build-tool independent and
> natural), combined with the #pragma lib requesting feature.
> harbour -mt hello.prg -> would generate .c file which
> would force hbvmmt lib linkage, otherwise everything
> would stays as it is now.
> What do you guys think? Przemek, do you think it's doable?

#pragma lib works only with few C compilers and not on all platforms
so it will not be portable solution. Also it does not exclude using
other libs. It means that if you will have two hbvm libraries in
the linker command then functions will be chosen from both and final
application will crash. It can make more problems then help.
Probably the only one but simple solution we can make is adding
function which will be only in hbvmmt and use REQUEST mechanism.
At least MT programs will not be linked.
-mt is linker parameter not compiler and linker needs information
that hbvmmt should be used instead of hbvm and here excluding hbvm
may be problem.
The easiest way is creating C compiler and linker wrappers for it
which will work like hb* scripts. Few weeks ago I created simple
.prg code which have hb *script functionality for GCC based builds
(GCC, DJGPP, MINGW, ...) and it even works for me though I haven't
tested it extensively. Then I hacked it to work with BCC and this
also seems to work though the code begins to be odd. If someone
is interesting in farther developing of this tools then I can try
to clean this code a little bit and send to SVN repository.
It seems to be natural that this code should be converted to OOP
with some base classes (for C compilers and platforms) and then
each new C compiler can inherit from them. It should make the code
much more cleaner and easy to maintain then now.

best regards,
Przemek
_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to