jparada wrote:I do not know how to create my own library as I did in Clipper, with Lib.Exe, to use with the IDE. Can someone please tell me how to do it.
Additionally, so far, I have not used the IDE, how can "translate" what I have done without the IDE (only code in MiniGUI), for use with the IDE
Español
No sé como generar mi propia librería como yo lo hacía en clipper, con Lib.Exe, para poder utilizarla con el IDE. Puede alguien indicarme como hacerlo.
Adicionalmente, hasta ahora, no he utilizado el IDE, cómo puedo "convertir" lo que ya he realizado sin el IDE (solamente código) en MiniGUI, para utilizarlo con el IDE
Thank you/Gracias
Greetings/Saludos
Javier
Hi Javier,
A. This is the way I made my library in HMG:
1. I a created a dummy main program that calls nothing in my own procedure or function list. The dummy main looks like this:
function Main
msginfo( "test", "test" )
return nil
2. Using HMG IDE do an add module from the menu bar and set this dummy.prg as the main module. After that add those .prg files that you wish to be included in the library. Your list in HMG IDE would resemble like these:
dummy.prg
yourlibrarycode1.prg
yourlibrarycode2.prg
yourlibrarycode3.prg
.
.
.
yourlibrarycode10.prg
Note: The file names are example only.
3. From HMG IDE click the button run or from the Project Menu click Build or simply press CTRL+F5 to generate those .prgs' into object files.
4. Then assemble the library manually. I use to build mine using a batch file like this:
filename: make_a.bat or make_a.cmd (either one will do)
set path=%path%;C:\hmg\MINGW\bin
ar -q -s <libValleyLiBs>.a daleaid.o
ar -q -s <libValleyLiBs>.a DaleAidPrint.o
ar -q -s <libValleyLiBs>.a yourlibrarycode1.o
ar -q -s <libValleyLiBs>.a yourlibrarycode2.o
ar -q -s <libValleyLiBs>.a yourlibrarycode3.o
.
.
.
ar -q -s <libValleyLiBs>.a yourlibrarycode10.o
ar -t libValleyLiBs.a archive.log
copy /Y libValleyLiBs.a c:\hmg\lib
In your actual code remove the symbol < > or omit those symbols in your library name. I only put those symbols to specify that you have to replaced that with your own library name.
NOTE: Your library name must begin with the word "lib". Then to link your library with your applications you have to specify that in HMG IDE Preference (Tools Menu). But then, there is another catch there, you have to specify only your library name minus the word "lib" and the extention .a; example: ValleyLiBs. Take a look at the actual file name. Well it seems that HMG IDE automatically adds the word "lib" and the extention. So if you specify lib<yourlibraryfilename>.a HMG IDE won't be able to find that. In short omit the prefix "lib" in the preference.
TIP: If you have a long list of prg files you can use the command line or dos command dir *.prg > prg.txt to get the list and edit that file.
B. This is the way I build my library in HMG Extended:
1. filename: bcc_compile.bat or bcc_compile.cmd
@call c:\minigui\batch\compile.bat DADEaster /-X /NL
@call c:\minigui\batch\compile.bat DALEAID /-X /NL
@call c:\minigui\batch\compile.bat DaleAidPrint /-X /NL
@call c:\minigui\batch\compile.bat DATEWIND /-X /NL
@call make_lib.bat
2. To assemble into .lib
filename: make_lib.bat or make_lib.cmd
c:\Borland\BCC55\Bin\tlib ValleyLiBs.Lib +-daleaid &
c:\Borland\BCC55\Bin\tlib ValleyLiBs.Lib +-DaleAidPrint &
c:\Borland\BCC55\Bin\tlib ValleyLiBs.Lib +-datewind &
That is the difference between the two HMGs'. If you stick to a syntax that is common to both flavors of HMGs' you can compile and run your apps on both flavors. Anyway knowing both will not be a disadvantage.
I hope that helps you.
Regards,
Danny