OK, Now I see the problem.
Two solutions (tested and working :-) ) 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 ? If nobody complaint, I can upload it to the SVN tonight or tomorrow ! Regards, JF, -----Message d'origine----- De : harbour-boun...@harbour-project.org [mailto:harbour-boun...@harbour-project.org] De la part de Przemyslaw Czerpak Envoyé : mercredi 18 mars 2009 11:33 À : Harbour Project Main Developer List. Objet : Re: RE: [Harbour] pCode dll On Wed, 18 Mar 2009, J. Lefebvre wrote: Hi, > J I like the idea of free discusion about general concept, but we first > face a more basic problem. It's working for me as it should. > Either on full Borland or full MSVC (no mix of compiler) You can create > a pure pcode dll, you can load it, but it does'nt work at all, even > dynamically (using HB_LIBLOAD, HB_LIBDO). Probably the .dll name in windows build was changed and source code was not updated. I do not know but the names in source/vm/maindllp.c seems to be synced by Viktor. > It seem that the exe generated does'nt export some needed function > (like, at least, hb_vmProcessDynLibSymbols, called from maindllp.c ). They have but I guess they are not exported. > I tried to add it to hbvmpub.ch (like hb_vmExecute ) but it does'nt solve > anything. This part I do not understand. hb_vmProcessDynLibSymbols() is already declared in hbvm.h. It's enough. > For hb_vmExecute(), here is what we can found into hbvmpub.h. > "extern HB_EXPORT void hb_vmExecute( const BYTE * pCode, PHB_SYMB pSymbols ) > HB_FLATTEN_ATTR; /* invokes the virtual machine */" Also good. > How could I render those two functions exported. If I do impdef myexe.def > myexe.exe, nothing is exported ? So was not declared as exported. > Any Idea, I'm ready to try to make it work but I need some idea on > "where or what" to search . I guess you build Harbour without HB_DYNLIB macro. In such case HB_EXPORT is not defined. See hbdefs.h. AFAIR HB_DYNLIB is set only for harbour.dll. At least it was working in such way. If you want to export symbols also in static harbour libraries so later you can access them from external DLLs then you will have to recompile whole Harbour code with -DHB_DYNLIB. best regards, Przemek _______________________________________________ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour _______________________________________________ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour