On Tue, 18 May 2010, vszak...@users.sourceforge.net wrote:

Hi,

> 2010-05-18 02:25 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
>     ; TODO: Couldn't find how to pass .def files to Open Watcom wlink.
>             Anybody with an experience here?

As I can see OW supports .def files only in 'link' command and
wlink uses a little bit different format. It's necessary to use
EXPORT command in .lnk file or include separate file with such
definitions using @<filename> command.
Here are commands I used with Open Watcom:

   EXPORT DllGetClassObject   = '_dllgetclassobj...@12'  PRIVATE
   EXPORT DllCanUnloadNow     = '_dllcanunload...@0'     PRIVATE
   EXPORT DllRegisterServer   = '_dllregisterser...@0'
   EXPORT DllUnregisterServer = '_dllunregisterser...@0'
   EXPORT DllMain             = '_dllm...@12'

We can add function which will translate .def files to this format
or we can leave it for users and include them as separate in link
script. But here we still have the problem that HBMK2 ignores
commands like
   -ldfl...@myolesrv.def
Viktor for me it's a bug which should be fixed. Why you decided
that HBMK2 should ignore compiler and linker command specified by
user if they do not start with "-" character?
In my opinion any <text> passed as -*flag=<text> should be passed
to corresponding Harbour/C compiler/linker and HBMK2 should not
silently ignore only some of them. In some situations like above
it's serious limitation.

There is also yet another important problem with current OpenWatcom
MS-Windows builds. Current harbour OW build time switches forces
stack calling convention and not all Open Watcom libraries are compiled
in this mode. It causes that it's not possible to use some extensions
like OLE code due to unresolved external, i.e. try to link
contrib/hbwin/tests/testax.prg
If user wants to use OLE with Open Watcom builds then it has to
recompile whole Harbour code with:
   HB_USER_CFLAGS=-6r
and then use -cflag=-6r HBMK2 parameter.
Can we switch back OpenWatcom builds to its default calling convention?

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

Reply via email to