Create a DLL with xharbour

Create a DLL with xharbour

Postby Marco Turco » Fri Nov 04, 2011 3:13 pm

Hi all,
I need to create a DDL with FWH+xHarbour.
I am trying to test tutor01.prg with buildhd.bat provided into the samples FWH folder but a maindll.obj is required .
Any solution using xHarbour ? Thanks in advance.
Best Regards,

Marco Turco
SOFTWARE XP LLP
User avatar
Marco Turco
 
Posts: 858
Joined: Fri Oct 07, 2005 12:00 pm
Location: London

Re: Create a DLL with xharbour

Postby Rick Lipkin » Fri Nov 04, 2011 4:17 pm

Marco

Have a look at rc2dll32.bat in the \dll folder ..

I use both Borland and Resedit depending on my purpose :

Borland:
Code: Select all  Expand view

rem RC file to 32 bits resources DLL
rem syntax: rc2dll32.bat Your_rc_file  !!! without the .RC extension

DEL ChurW32.DLL
DEL ChurW32.RC

COPY *.RC ChurW32.RC

C:\BORLAND\BCC55\BIN\bcc32 -c c:\fwh910\dll\screen32.c
C:\BORLAND\BCC55\BIN\brc32 -r %1.rc
C:\BORLAND\BCC55\BIN\ilink32 /Tpd c:\borland\bcc55\lib\c0d32.obj screen32.obj, %1.dll,,c:\borland\bcc55\lib\cw32.lib c:\borland\bcc55\lib\import32.lib,, %1.res
del *.iL?
del *.map
del *.obj
:del *.res
del *.tds
echo done!
 


Resedit:
Code: Select all  Expand view

rem RC file to 32 bits resources DLL
rem syntax: rc2dll32.bat Your_rc_file  !!! without the .RC extension

DEL YACHTW32.RES
DEL YACHTW32.RC
DEL YACHTW32.DLL

COPY *.RC YACHTW32.RC


c:\resedit\resedit.exe -convert yachtw32.rc yachtw32.res
c:\resedit\resedit.exe -convert yachtw32.res yachtw32.dll


del *.iL?
del *.map
del *.obj
:del *.res
del *.tds
del *.~??
echo done!
 
User avatar
Rick Lipkin
 
Posts: 2665
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Create a DLL with xharbour

Postby Marco Turco » Fri Nov 04, 2011 4:42 pm

Ok but I don't want to convert a rc file in a dll but create a dll with functions inside, like tutor01.prg and testdll.prg to be clearr
Best Regards,

Marco Turco
SOFTWARE XP LLP
User avatar
Marco Turco
 
Posts: 858
Joined: Fri Oct 07, 2005 12:00 pm
Location: London

Re: Create a DLL with xharbour

Postby Rick Lipkin » Fri Nov 04, 2011 5:59 pm

Marco

Lots of good 32-64 bit ( free ) Resource editors such as PellsC and Resedit. I am sure many other developers have their own favorite .. but I have found Resedit to be a single Executable and works great compiling resources from one format to another as well as creating .rc or .dll from scratch .. see screen shots.

Rick Lipkin

http://www.resedit.net/

Just download Resedit .. no need for any sdk

Image

Image
User avatar
Rick Lipkin
 
Posts: 2665
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Create a DLL with xharbour

Postby Marco Turco » Fri Nov 04, 2011 6:08 pm

Rick,
I don't want to convert a rc file in a dll but create a dll with functions inside, like tutor01.prg and testdll.prg to be clear
Best Regards,

Marco Turco
SOFTWARE XP LLP
User avatar
Marco Turco
 
Posts: 858
Joined: Fri Oct 07, 2005 12:00 pm
Location: London

Re: Create a DLL with xharbour

Postby Enrico Maria Giordano » Fri Nov 04, 2011 6:22 pm

In other words, Marco doesn't want to create a resource DLL. He wants to build a DLL containing xHarbour functions. And before you ask me, no, I don't know how to do it (neither if it is possible at all).

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8712
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Create a DLL with xharbour

Postby Marco Turco » Fri Nov 04, 2011 6:34 pm

Thanks Enrico.
It is possibile for sure with harbour (there is the working tutor01/testdll into the samples FWH folder),
the problem I need to use xharbour for this and the obj file maindll.obj is missing in xHarbour
Best Regards,

Marco Turco
SOFTWARE XP LLP
User avatar
Marco Turco
 
Posts: 858
Joined: Fri Oct 07, 2005 12:00 pm
Location: London

Re: Create a DLL with xharbour

Postby andijahja » Fri Nov 04, 2011 8:10 pm

Marco Turco wrote:Hi all,
I need to create a DDL with FWH+xHarbour.
I am trying to test tutor01.prg with buildhd.bat provided into the samples FWH folder but a maindll.obj is required .
Any solution using xHarbour ? Thanks in advance.


Hello,

Yes. There is quite an elegant solution with xHarbour. If you happen to have an SVN copy of xHarbour, please look at tests/pdllbc.bat. You can even create many small DLLs which can interact amongst themselves and of course the main program.
Andi
User avatar
andijahja
 
Posts: 35
Joined: Sun Aug 29, 2010 12:44 pm

Re: Create a DLL with xharbour

Postby Marco Turco » Sat Nov 05, 2011 10:48 am

Hi Andy,
Do you mean pdl55.bat ?
Is there also a working sample of a dll and a call to that dll ?
Best Regards,

Marco Turco
SOFTWARE XP LLP
User avatar
Marco Turco
 
Posts: 858
Joined: Fri Oct 07, 2005 12:00 pm
Location: London

Re: Create a DLL with xharbour

Postby andijahja » Sat Nov 05, 2011 10:12 pm

Marco Turco wrote:Hi Andy,
Do you mean pdl55.bat ?
Is there also a working sample of a dll and a call to that dll ?


Hello,

pdll55.bat was actually replaced by pdllbc.bat. Yes there is sample programs in test folder. Just execute pdllbc.bat without mentioning any program file. If you want to go deeper please read the file (pdllbc.bat)
Andi
User avatar
andijahja
 
Posts: 35
Joined: Sun Aug 29, 2010 12:44 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 118 guests