HI Przemek,

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.

Okay, let's forget this one.

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.

Sounds much better indeed.

-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.

Sounds even better, I think you should upload it, and
we'll finish remaining parts, it would be good to have
a common platform and build-type independent tool instead
of hbmk scripts, bld.bat and hbmake.

I'd propose naming it simply 'hb'.

BTW, and I don't want to steal your own time, but if
you find some room for it, it'd be great if you could
check whether adding multifile .c compilation support
for -go? option. If it's not that much work. It could
probably make some of our make files cleaner, and it
might also fix the MSVC dependency checking problem for
.prg files at the same time.

Brgds,
Viktor

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

Reply via email to