Andi,
The duplicated function is intentional, and was fully explained by
ChangeLog:
2008-10-09 18:20 UTC-0430 Ron Pinkas <ron/at/xharbour.com>
* source/vm/maindllh.c
+ Added version of hb_vmProcessSymbols() which redirects to
hb_vmProcessDllSymbols()
/*
The maindllh module is linked into harbour.dll and will therfore be
used to
process the self contained RTL symbols as dynamic.
Any PCODE Dll must also be linked against Harbour.dll (Harbour.lib)
and will therefore link to hb_vmProcessSymbols() of
harbour.lib:maindllh.obj
thus processing the Dll's PCODE symbols as dynamic.
*/
+ source/vm/maindlle.c
+ Added maindlle.c which uses a version of hb_vmProcessSymbols() which
redirects to hb_vmProcessExeSymbols()
/*
The maindlle module is is now linked into dllmain.lib instead of
maindllh.c
DllMain.lib should be linked into EXE applications which are
staticly
linked to harbour.dll by means of harbour.lib.
The prg modules of such EXE should use the native version of
hb_vmProcessSymbols() in hvm.c
but that version is masked by the maindllh module.
Linking DllMain.lib (before Harbour.lib) resolves that problem, by
linking to
hb_vmProcessSymbols() in the maindlle module, which then redirects
to the native
hb_vmProcessSymbols(). This in turn processes the modules of the
EXE as static symbols.
Please note that in such sample, staticly linked application,
UseDll.exe, the dynamic
symbols (harbour.dll and optionally PrgPCode.dll) will be processed
as dynamic symbols,
while the application defined symbols will be processed as static,
and are allowed to
OVERRIDE any dynamic symbol loaded from dll (symbols from staticly
linked dlls are
loaded first).
*/
The linker only links the FIRST definition, and all my tests with DLLs were
working perfectly.
If you had problem with harbour.dll then please provide more details so that
we can review.
Ron
--------------------------------------------------
From: "Andi Jahja" <[EMAIL PROTECTED]>
Sent: Saturday, November 22, 2008 8:41 PM
To: "Ron Pinkas" <[EMAIL PROTECTED]>
Cc: "xHarbour-Developers List" <[email protected]>
Subject: Re: [xHarbour-developers] ChangeLog: 2008-11-23 10:30 UTC+0700
AndiJahja <xharbour/AT/telkom/net/id>
> Ron,
>
> My comment explains it, I think. By having the function in maindll.c,
> any EXE built with harbour.dll complains of "no start up procedure",
> error 9013. Please built DLL in your part and test hbtestdll.exe.
> I believe my answer is a trivial one rather than technical one. :-)
>
> Can you please explain too, why a function should appear in two modules,
> ie. maindllh.c and hvm.c ? And both are linked when we create a DLL EXE?
>
> --
> Andi
>
> On Sat, 22 Nov 2008 20:18:48 -0800
> Ron Pinkas <[EMAIL PROTECTED]> wrote:
>
>> > 2008-11-23 10:30 UTC+0700 Andi Jahja <xharbour/AT/telkom/net/id>
>> > * source/vm/maindll.h
>> > - commented hb_vmProcessSymbols(), because it is defined in hvm.c
>> > Having this function in maindllh.c causes application cannot find
>> > starting procedure (Internal Error: 9013).
>>
>> Andi, sorry but this is not correct. This is intentional and needed. Can
>> you
>> please explain the problem you had?
>>
>> Ron
>
>
>
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
xHarbour-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xharbour-developers