Andy:

I've always built xHarbour with the __EXPORT__ flag in order
to create pcode dlls.  Removing this feature is really bad.

The way I use to avoid the function definition error is to add the
underscore to the functions in the dll code.

In the main prg:
#include "harbdll.ch"
Function _SomeFunc( a, b, c )
Return HB_LibDo( "SomeFunc", a, b, c )

In the dll prg (never include harbdll.ch):
#define _HARBDLL_CH
Function _SomeFunc( a, b, c )
.....
Return nil

In the harbdll.ch
#ifndef _HARBDLL_CH
   #xtranslate SomeFunc  => _SomeFunc
#else
   #include "dynamic.ch"   // code created include file... mkFuncList() 
below
#endif

// based on sample provided by Przemek
Function mkFuncList()
Local aFunc, hFile, lRetVal := .f.

aFunc := getFuncList()
If ( hFile := FCreate( "dynamic.ch" ) ) > -1
   FWrite( hFile, "// dynamically created xharbour header file - do not 
edit!" + hb_osNewLine() )
   AEval( aFunc, {|cFunc| FWrite( hFile, "DYNAMIC " + cFunc + 
hb_osNewLine() ) } )
   FClose( hFile )
   lRetVal := .t.
Endif

Return lRetVal

Function getFuncList()
Local aFunc, nCount := __dynsCount(), nDst := 0, nI

aFunc := Array( nCount )
For nI := nCount To 1 Step -1
   If __dynsIsFun( nI )
      aFunc[ ++nDst ] := __dynsGetName( nI )
   Endif
Next
ASize( aFunc, nDst )

Return aFunc



Please find a way to get this feature back.

Regards,

Andi Jahja wrote:
> Hello,
>
> Sorry for late reply.
>
> IMO, one should never find any problem in building xHarbour with
> _STANDARD__ flags as per CVS. 
>
> The ifdef/endif condition was put there for DLL mode only, because the
> function in question is defined in maindll*.c file. Without this def,
> MSVC will fail to build DLL because of function redefinition. You may
> say use /force:multiple, but I try to be clean not to use that hack.
>
> --
> Andi
>
> On Fri, 8 Jan 2010 11:27:18 -0800
> Ron Pinkas <ron.pin...@xharbour.com> wrote:
>
>   
>> I also have such problem with xCC, and after pulling many hairs, I 
>> discovered in hvm.c line 10671:
>>
>> #ifndef __EXPORT__
>> PSYMBOLS hb_vmProcessSymbols( PHB_SYMB pSymbols, USHORT uiModuleSymbols, 
>> const char *szModule, int iPCodeVer, PHB_ITEM *pGlobals ) /* module symbols 
>> initialization */
>> ...
>>
>> Andi, can you please explain what did you intend with that change?
>>
>> Ron
>>
>> --------------------------------------------------
>> From: "Luis Krause Mantilla" <lkrau...@shaw.ca>
>> Sent: Thursday, January 07, 2010 11:42 PM
>> To: "Xharbour-Developers" <xharbour-developers@lists.sourceforge.net>
>> Subject: [xHarbour-developers] More on the _hb_vmProcessSymbols error
>>
>>     
>>> Up to changelog 1.6665, xharbour builds fine:
>>>
>>> 2009-12-29 23:00 UTC+0700 Andi Jahja <xharbour/AT/telkom/net/id>
>>>
>>> It's after this date that the _hb_vmProcessSymbols appears, at
>>> least for Borland 5.5.1.
>>>       
> \
>
> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev 
> _______________________________________________
> xHarbour-developers mailing list
> xHarbour-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/xharbour-developers
>
>   

-- 
Luis Krause Mantilla
lkrausem at shaw dot ca
luis_krause at hotmail dot com
"May the Source be with GNU"



------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
xHarbour-developers mailing list
xHarbour-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xharbour-developers

Reply via email to