Hi JF,
> 1) I can rebuild harbour and it's libs with -DHB_DYNLIB and it work !!! But > I'm not sure what's it's implied exporting all harbour function ... I must > say I don't like. 2) I created a new define HB_EXPORTP like HB_EXPORT, not disabled by > HB_DYNLIB (but protected by the OS and or compiler, like HB_EXPORT) and used > solely for exporting two functions > > extern HB_EXPORTP void hb_vmExecute( const BYTE * pCode, PHB_SYMB > pSymbols ) HB_FLATTEN_ATTR; /* invokes the virtual machine */ > extern HB_EXPORTP PHB_SYMB hb_vmProcessDynLibSymbols( PHB_SYMB pSymbols, > USHORT uiSymbols, const char * szModuleName, ULONG ulID, USHORT uiPcodeVer > ); /* module symbols initialization with extended information */ > > For that I only modified hbdefs.h, hbvm.h and hbvmpub.h > > Then compiling Harbour without -DHB_DYNLIB give my exe export only two > function, as needed for pcode only Dll. > > What do you think about that ? 1) One problem with this is that an .exp / .lib file will be generated for *every* Harbour executables created, at least with MSVC. This is because these two symbols will now be exported from all Harbour executables. [ I've been dealing with this issue in the last few months quite heavily. ] 2) It won't solve -gc3 compiled .prg code. These need some more functions to be exported. 3) I'd use some other name, like HB_EXPORTFORCED, because the meaning of 'p' is very ambiguous (it was "*p*code dynamic lib probably, but this isn't precise). 4) It's still unclear what is the importance of maindllp.c, as it's not used anywhere inside Harbour. I'd rather say to use HB_DYNLIB option by those who'd like this functionality. I'd expect it's not widely used by too many ppl, as such bugs have been unnoticed for at least 8 years :) Maybe there are other solutions without downsides. [ A possible one is to have stubs for these exported functions, and these stubs be placed in a separate lib which would always be built with exported symbols. This would need special Harbour switch to generate code for these stubs. Probably -gc3 mode should be disabled in such mode. ] Brgds, Viktor
_______________________________________________ Harbour mailing list [email protected] http://lists.harbour-project.org/mailman/listinfo/harbour
