Help with using IDE
Moderator: Rathinagiri
Help with using IDE
Hi. My name is Mark Goldfarb. I am working converting some Clipper applications I wrote around 20+ years ago to work running under Windows 7. I managed to get the application compiled under the Harbour in the console mode. I want to modernize the menus, so I decided to try IDE. I am stuck though (I am sure I am missing somehting obvious). I create a caption and headings in IDE builder under the Main Menu. I press OK. Nothing shows up on the form. How do I use the generate the form.
Thanks.
Mark
Thanks.
Mark
- esgici
- Posts: 4543
- Joined: Wed Jul 30, 2008 9:17 pm
- DBs Used: DBF
- Location: iskenderun / Turkiye
- Contact:
Re: Help with using IDE
Hello MarkMGOLDFARB wrote:... I am stuck though (I am sure I am missing somehting obvious). I create a caption and headings in IDE builder under the Main Menu. I press OK. Nothing shows up on the form. How do I use the generate the form.
Thanks.
Mark
Welcome aboard
Does you add your form to your prg ?
Such as
Code: Select all
LOAD WINDOW <cFormName>
ACTIVATE <cFormName>
HMG Help wrote: LOAD WINDOW <WindowDefinitionFileName> [ AS <WindowName> ]
If you omit the AS clause, the window definition file name (without extension)
is assumed as the window name.
A HMG window definition file ('.fmg' file) is a text file containing a window
definition, using standard HMG code, except the window name in the
DEFINE WINDOW command (you must use TEMPLATE word instead).
Without seen your code it's difficult make a comment on the mark
If you send us a little sample may be we will help you more easily.
Happy HMG'ing
Viva INTERNATIONAL HMG
- danielmaximiliano
- Posts: 2611
- Joined: Fri Apr 09, 2010 4:53 pm
- Location: Argentina
- Contact:
Re: Help with using IDE
Hi Mark :MGOLDFARB wrote:Hi. My name is Mark Goldfarb. I create a caption and headings in IDE builder under the Main Menu. I press OK. Nothing shows up on the form. How do I use the generate the form.
he controls generated by the forms generated are shown on the layout, but for various controls is not so example:
main menu / status bar.
this does not allow for my good form design, as I have to know beforehand the size of it and this for a new user of the IDE is frustrating.
You can read more about the controls hmg documentation of this folder in the installation of hmg.3.0.42.
C:/hmg.3.0.42/doc/data/index.htm
this document can be invoked from ide from : Menu help / reference hmg
can also see different examples of hmg in the Samples folder : C:/hmg.3.0.42/samples
no more can you leave your question here and we will help where possible with the development of its application.
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
Re: Help with using IDE
Thank you both. I got the graphical menus to work through IDE. Now my next issue...
I want to have the menus call the old clipper code (which I was able to compile and run; without the graphical menus).
When I mix the two, and compile, I am getting a multiple definition error on some of the commone procedures and functions.
Any ideas? Here is the log when compiling/linking.
hbmk2: Processing local make script: hbmk.hbm
hbmk2: Compiling Harbour sources...
Harbour 3.1.0dev (Rev. 17111)
Copyright (c) 1999-2011, http://harbour-project.org/
Compiling 'C:\MyHMGProjects\Cashguard\main.prg'...
Compiling 'initialize.prg'...
Compiling 'reorg.prg'...
Lines 5999, Functions/Procedures 5
Generating C source output to '.hbmk\win\mingw\main.c'... Done.
Compiling 'C:\MyHMGProjects\Cashguard\initialize.prg'...
Compiling 'reorg.prg'...
Lines 5999, Functions/Procedures 4
Generating C source output to '.hbmk\win\mingw\initialize.c'... Done.
hbmk2: Compiling...
hbmk2: Linking... main.exe
.hbmk/win/mingw/initialize.o:initialize.c:(.text+0x0): multiple definition of `HB_FUN_ARMY'
.hbmk/win/mingw/main.o:main.c:(.text+0x0): first defined here
.hbmk/win/mingw/initialize.o:initialize.c:(.text+0x20): multiple definition of `HB_FUN_REORG'
.hbmk/win/mingw/main.o:main.c:(.text+0x20): first defined here
.hbmk/win/mingw/initialize.o:initialize.c:(.text+0x40): multiple definition of `HB_FUN_OPEN'
.hbmk/win/mingw/main.o:main.c:(.text+0x40): first defined here
.hbmk/win/mingw/initialize.o:initialize.c:(.text+0x60): multiple definition of `HB_FUN_INITIALIZE'
.hbmk/win/mingw/main.o:main.c:(.text+0x60): first defined here
.hbmk/win/mingw/network.o:network.c:(.text+0x0): multiple definition of `HB_FUN_GEN_ERROR'
.hbmk/win/mingw/gen_error.o:gen_error.c:(.text+0x0): first defined here
.hbmk/win/mingw/readonly.o:readonly.c:(.text+0x0): multiple definition of `HB_FUN_READONLY'
.hbmk/win/mingw/cl_add2.o:cl_add2.c:(.text+0x0): first defined here
.hbmk/win/mingw/reorg.o:reorg.c:(.text+0x0): multiple definition of `HB_FUN_ARMY'
.hbmk/win/mingw/main.o:main.c:(.text+0x0): first defined here
.hbmk/win/mingw/reorg.o:reorg.c:(.text+0x20): multiple definition of `HB_FUN_REORG'
.hbmk/win/mingw/main.o:main.c:(.text+0x20): first defined here
collect2: ld returned 1 exit status
hbmk2: Error: Running linker. 1
gcc.exe .hbmk/win/mingw/main.o .hbmk/win/mingw/client_information_button_1_action.o .hbmk/win/mingw/cl_add.o .hbmk/win/mingw/cl_add2.o .hbmk/win/mingw
/dbed.o .hbmk/win/mingw/gen_error.o .hbmk/win/mingw/initialize.o .hbmk/win/mingw/main_button_1_action.o .hbmk/win/mingw/network.o .hbmk/win/mingw/open
win.o .hbmk/win/mingw/readonly.o .hbmk/win/mingw/reorg.o .hbmk/win/mingw/yes_no.o .hbmk/win/mingw/_hbmkaut_main.o .hbmk/win/mingw/_hbmkcpp_main.o -
mwindows -Wl,--start-group -lgtwvg -lsupc++ -lhbqtcore -lQtCore4 -lhbqtgui -lQtGui4 -lhbqtnetwork -lQtNetwork4 -lhbqtsql -lQtSql4 -lgtqtc -lhmg -lhbct
-lxhb -lhbtip -lhbwin -lpng -lhbfship -lhbxpp -lhbextern -lhbdebug -lhbvmmt -lhbrtl -lhblang -lhbcpage -lgtcgi -lgtpca -lgtstd -lgtwin -lgtwvt -lgtgu
i -lhbrdd -lhbuddall -lhbusrrdd -lrddntx -lrddcdx -lrddnsx -lrddfpt -lhbrdd -lhbhsx -lhbsix -lhbmacro -lhbcplr -lhbpp -lhbcommon -lhbmainwin -lkernel3
2 -luser32 -lgdi32 -ladvapi32 -lws2_32 -lwinspool -lcomctl32 -lcomdlg32 -lshell32 -luuid -lole32 -loleaut32 -lmpr -lwinmm -lmapi32 -limm32 -lmsimg32 -
lwininet -lhbpcre -lhbzlib -Wl,--end-group -omain.exe -Lc:/hmg.4/harbour/lib/win/mingw -Lc:/hmg.4/harbour/bin -LC:/HMG.4/SVN/lib -Lc:/hmg.4/harbour
/lib
Press any key to continue . . .
I want to have the menus call the old clipper code (which I was able to compile and run; without the graphical menus).
When I mix the two, and compile, I am getting a multiple definition error on some of the commone procedures and functions.
Any ideas? Here is the log when compiling/linking.
hbmk2: Processing local make script: hbmk.hbm
hbmk2: Compiling Harbour sources...
Harbour 3.1.0dev (Rev. 17111)
Copyright (c) 1999-2011, http://harbour-project.org/
Compiling 'C:\MyHMGProjects\Cashguard\main.prg'...
Compiling 'initialize.prg'...
Compiling 'reorg.prg'...
Lines 5999, Functions/Procedures 5
Generating C source output to '.hbmk\win\mingw\main.c'... Done.
Compiling 'C:\MyHMGProjects\Cashguard\initialize.prg'...
Compiling 'reorg.prg'...
Lines 5999, Functions/Procedures 4
Generating C source output to '.hbmk\win\mingw\initialize.c'... Done.
hbmk2: Compiling...
hbmk2: Linking... main.exe
.hbmk/win/mingw/initialize.o:initialize.c:(.text+0x0): multiple definition of `HB_FUN_ARMY'
.hbmk/win/mingw/main.o:main.c:(.text+0x0): first defined here
.hbmk/win/mingw/initialize.o:initialize.c:(.text+0x20): multiple definition of `HB_FUN_REORG'
.hbmk/win/mingw/main.o:main.c:(.text+0x20): first defined here
.hbmk/win/mingw/initialize.o:initialize.c:(.text+0x40): multiple definition of `HB_FUN_OPEN'
.hbmk/win/mingw/main.o:main.c:(.text+0x40): first defined here
.hbmk/win/mingw/initialize.o:initialize.c:(.text+0x60): multiple definition of `HB_FUN_INITIALIZE'
.hbmk/win/mingw/main.o:main.c:(.text+0x60): first defined here
.hbmk/win/mingw/network.o:network.c:(.text+0x0): multiple definition of `HB_FUN_GEN_ERROR'
.hbmk/win/mingw/gen_error.o:gen_error.c:(.text+0x0): first defined here
.hbmk/win/mingw/readonly.o:readonly.c:(.text+0x0): multiple definition of `HB_FUN_READONLY'
.hbmk/win/mingw/cl_add2.o:cl_add2.c:(.text+0x0): first defined here
.hbmk/win/mingw/reorg.o:reorg.c:(.text+0x0): multiple definition of `HB_FUN_ARMY'
.hbmk/win/mingw/main.o:main.c:(.text+0x0): first defined here
.hbmk/win/mingw/reorg.o:reorg.c:(.text+0x20): multiple definition of `HB_FUN_REORG'
.hbmk/win/mingw/main.o:main.c:(.text+0x20): first defined here
collect2: ld returned 1 exit status
hbmk2: Error: Running linker. 1
gcc.exe .hbmk/win/mingw/main.o .hbmk/win/mingw/client_information_button_1_action.o .hbmk/win/mingw/cl_add.o .hbmk/win/mingw/cl_add2.o .hbmk/win/mingw
/dbed.o .hbmk/win/mingw/gen_error.o .hbmk/win/mingw/initialize.o .hbmk/win/mingw/main_button_1_action.o .hbmk/win/mingw/network.o .hbmk/win/mingw/open
win.o .hbmk/win/mingw/readonly.o .hbmk/win/mingw/reorg.o .hbmk/win/mingw/yes_no.o .hbmk/win/mingw/_hbmkaut_main.o .hbmk/win/mingw/_hbmkcpp_main.o -
mwindows -Wl,--start-group -lgtwvg -lsupc++ -lhbqtcore -lQtCore4 -lhbqtgui -lQtGui4 -lhbqtnetwork -lQtNetwork4 -lhbqtsql -lQtSql4 -lgtqtc -lhmg -lhbct
-lxhb -lhbtip -lhbwin -lpng -lhbfship -lhbxpp -lhbextern -lhbdebug -lhbvmmt -lhbrtl -lhblang -lhbcpage -lgtcgi -lgtpca -lgtstd -lgtwin -lgtwvt -lgtgu
i -lhbrdd -lhbuddall -lhbusrrdd -lrddntx -lrddcdx -lrddnsx -lrddfpt -lhbrdd -lhbhsx -lhbsix -lhbmacro -lhbcplr -lhbpp -lhbcommon -lhbmainwin -lkernel3
2 -luser32 -lgdi32 -ladvapi32 -lws2_32 -lwinspool -lcomctl32 -lcomdlg32 -lshell32 -luuid -lole32 -loleaut32 -lmpr -lwinmm -lmapi32 -limm32 -lmsimg32 -
lwininet -lhbpcre -lhbzlib -Wl,--end-group -omain.exe -Lc:/hmg.4/harbour/lib/win/mingw -Lc:/hmg.4/harbour/bin -LC:/HMG.4/SVN/lib -Lc:/hmg.4/harbour
/lib
Press any key to continue . . .
- esgici
- Posts: 4543
- Joined: Wed Jul 30, 2008 9:17 pm
- DBs Used: DBF
- Location: iskenderun / Turkiye
- Contact:
Re: Help with using IDE
Hi Mark
As far as I know, any listed references as multiple definition :
So, probably these are modules of your project, placed more than one .prg file.
May be these multiple .prg file included via or statement and by added your project definition ( .hbp ) file.
May be also these modules ( function / procedure ) defined more than one .prg file. In this case a search utility may be useful.
Anyway you have check your code.
Happy HMG'ing
Congrats, Good news,MGOLDFARB wrote:I got the graphical menus to work through IDE.
This is a bit difficult situation.MGOLDFARB wrote:... I am getting a multiple definition error on some of the commone procedures and functions.
As far as I know, any listed references as multiple definition :
- ARMY()
REORG()
OPEN()
INITIALIZE()
GEN_ERROR()
READONLY()
So, probably these are modules of your project, placed more than one .prg file.
May be these multiple .prg file included via
Code: Select all
#include
Code: Select all
SET PROCEDURE TO ...
May be also these modules ( function / procedure ) defined more than one .prg file. In this case a search utility may be useful.
Anyway you have check your code.
Happy HMG'ing
Viva INTERNATIONAL HMG
Re: Help with using IDE
That was quick. Thanks.
This are procedures in the application. They are called by DO statements. ie DO REORG.
These seperate .PRG are listed in teh modules section on the HMG IDE interface. I tried adding a SET PROCEDURE in the MAIN.PRG, no effect.
The procedures are only defined in the .PRG and they are called from multiple other PRG files.
Any other ideas?
Thanks!
Mark
This are procedures in the application. They are called by DO statements. ie DO REORG.
These seperate .PRG are listed in teh modules section on the HMG IDE interface. I tried adding a SET PROCEDURE in the MAIN.PRG, no effect.
The procedures are only defined in the .PRG and they are called from multiple other PRG files.
Any other ideas?
Thanks!
Mark
- esgici
- Posts: 4543
- Joined: Wed Jul 30, 2008 9:17 pm
- DBs Used: DBF
- Location: iskenderun / Turkiye
- Contact:
Re: Help with using IDE
No difference between calling method ( DO REORG or REORG() ).MGOLDFARB wrote: They are called by DO statements. ie DO REORG.
MGOLDFARB wrote:These seperate .PRG are listed in teh modules section on the HMG IDE interface.
This is right way.
You need no adding a SET PROCEDURE ... in contrarily, if added already you need extract it.MGOLDFARB wrote:I tried adding a SET PROCEDURE in the MAIN.PRG, no effect.
MGOLDFARB wrote:The procedures are only defined in the .PRG and they are called from multiple other PRG files.
"Multiple defined" means "defined more than one". So, you have find and eliminate these multiplications.
MGOLDFARB wrote:Any other ideas?
Yes:
Weak probability; but multiplications may came a .lib (.a) definition. Clipper .lib files doesn't compatible with MinGW, so doesn't usable for HMG; but may be converted .lib to .a.
IMHO you don't need a new idea; only check your code more deeply.
If you want, you can send me your entire source code : esgici <at> gmail <dot> com.
Happy HMG'ing
Viva INTERNATIONAL HMG
- danielmaximiliano
- Posts: 2611
- Joined: Fri Apr 09, 2010 4:53 pm
- Location: Argentina
- Contact:
Re: Help with using IDE
Hola - Hi Mark :MGOLDFARB wrote:Thank you both. I got the graphical menus to work through IDE. Now my next issue...
I want to have the menus call the old clipper code (which I was able to compile and run; without the graphical menus).
When I mix the two, and compile, I am getting a multiple definition error on some of the commone procedures and functions.
Add you code :
Code: Select all
#include "common.ch"
#include "inkey.ch"
#include "minigui.ch"
FUNCTION Main()
SET Navigation Extended
REQUEST DBFCDX, DBFFPT // I use index CDX
RDDSETDEFAULT ("DBFCDX")
REQUEST HB_GT_WIN_DEFAULT //Console + Win
SET EVENTMASK TO INKEY_ALL // Mouse sopport
SetMode(25,80) // Old screen
.....
Your code
...
Return
The first file should be your main application.
The following secondary files that contain functions and procedures used.
Code: Select all
seguro00.prg
actua004.prg
actua040.prg
armap004.prg
armap006.prg
Create Main.hbc
Code: Select all
incpaths=
libpaths=
libs=
gt=gtwin
mt=no
instpaths=
This icon will be included in your application and will be distinguished by the always the first icon resource file (. rc) is the main application that will use.
this resource file must be sorted alphabetically.
Code: Select all
Main ICON c:\icons\myaplication.ico
or use Mibuild.bat to build your application, You have two ways to use:
1) Double click and enter only the name of the application
2a) call Command or CMD in Windows, go to the folder of your application and run from there to Mibuild.bat and enter the application name.
2b) drag and drop Main.hbp on Mibuild.bat
Mibuild.bat must be in the same folder as your application.
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
Re: Help with using IDE
Hello MGOLDFARB !
Look at this topic:
viewtopic.php?f=33&t=2356
I think will be usefull to you (HMG Menu calling console screen routines)
Best regards
Look at this topic:
viewtopic.php?f=33&t=2356
I think will be usefull to you (HMG Menu calling console screen routines)
Best regards
M., Ronaldo
By: IMATECH
Imation Tecnologia
By: IMATECH
Imation Tecnologia
Re: Help with using IDE
Thank you all. I am not 100% sure what was the issue,but using your comments above, I was able to get the application compiled.
Now on to the next issues.
1. I noticed when I go from menu window to a sub-menu window (different forms), the previous form stays open. What is the command to close a form when moving to the next form.
2. If I want to have a menu option to Quit the program, do I just make a function with a QUIT in it? Or is there a better way of doing this.
3. Initially, the application needs to be hybrid of the new forms created in IDE, and the old @ SAY GET forms. Slowly, I will convert the hundreds of screens over. When I compile the application in Console mode (with no windows menus), all works fine. When I create the menus in IDE, and they call the older @say get screens, the @ SAY "xxxx" (what is in quotes) does not appear. The value of the filed in the GET does appear. Any ideas what I am missing here?
Thanks!
Mark
Now on to the next issues.
1. I noticed when I go from menu window to a sub-menu window (different forms), the previous form stays open. What is the command to close a form when moving to the next form.
2. If I want to have a menu option to Quit the program, do I just make a function with a QUIT in it? Or is there a better way of doing this.
3. Initially, the application needs to be hybrid of the new forms created in IDE, and the old @ SAY GET forms. Slowly, I will convert the hundreds of screens over. When I compile the application in Console mode (with no windows menus), all works fine. When I create the menus in IDE, and they call the older @say get screens, the @ SAY "xxxx" (what is in quotes) does not appear. The value of the filed in the GET does appear. Any ideas what I am missing here?
Thanks!
Mark