Page 1 of 1

About library included in the IDE

Posted: Tue Jun 30, 2009 7:26 pm
by jparada
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

Re: About library included in the IDE

Posted: Tue Jun 30, 2009 7:32 pm
by luisvasquezcl
Hola Javier,

para incluir tus librerias, sólo incluye el archivo.prg en el proyecto y listo.
Cuando compila el ide incluye todos los módulos declarados en esa ventana, no importa que no tengan un .fmg asociado.
Respecto de pasar tus ventanas hechas por código al ide creo que es medio complicado, creo que sería mejor dibujarlas nuevamente con el ide que tratar de pasarlas a mano.
Saludos cordiales,
Luis Vasquez

Re: About library included in the IDE

Posted: Tue Jun 30, 2009 8:40 pm
by dhaine_adp
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

Re: About library included in the IDE

Posted: Tue Jun 30, 2009 9:23 pm
by Vanguarda
dhaine_adp wrote:
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
Thanks Danny, you help me a lot. It will be very useful for me.

with best regards,

Re: About library included in the IDE

Posted: Wed Jul 01, 2009 3:12 am
by Rathinagiri
It will be easy by creating a make batch file.

For samples, we can see from c:\hmg\source\crypt,edit,graph etc folders makelib.bat. Just change the filenames. :)

Re: About library included in the IDE

Posted: Wed Jul 01, 2009 4:03 am
by dhaine_adp
rathinagiri wrote:It will be easy by creating a make batch file.

For samples, we can see from c:\hmg\source\crypt,edit,graph etc folders makelib.bat. Just change the filenames. :)
Hello Rathi,

Thanks for pointing me on those batch files. It never occured to me to inspect those files. I appreciate your kindness.

Regards,

Danny

Re: About library included in the IDE

Posted: Wed Jul 01, 2009 5:41 am
by jparada
Thank you very much for your replies, all very helpful Rathinagiri point is very good, before reading your response and the responses of Danny and Luis, I can do with the tool QAC, very fast. But I also want to try as Rathinagiri says.

Español
Muchas Gracias por sus respuestas, todas de mucha ayuda, El punto de Rathinagiri, es muy bueno, antes de leer su respuesta y las respuestas de Danny y de Luis, yo lo puede realizar con la herramienta QAC, muy rápido. Pero también quiero intentarlo como lo comenta Rathinagiri.

Thank you very much / Muchas Gracias

Greetings / Saludos
Javier