Page 2 of 2

Re: A new member from Saudi Arabia

Posted: Mon Jan 14, 2013 10:57 pm
by klauskugel
Hi Kahlani,
the functions you need are for DOS.
And obsolet in Windows. Try to replace them for Windows.

Therefore most of them is placed in Startup-Routine
in GTDOS and NOT in HMG 3.0.39 !!
HMG 3.0.39 uses in BUILD.BAT >> if "%1"=="/d" set gtdrivers=-GTWIN -GTGUI

Therefore you need to REPLACE such functionality.
The GTDOS - Functionality is the OLD DOS Startup, which you want to
get rid off, to use your Program in Windows.

//----------------------------------------------

Remainders of your functions of the old time are found in
Harbour/include/hbgfx.ch
Harbour/include/hbgtcore.h

USE_UDF -> User Defined Function for USE ? external library
FASTPCX -> PCX-Bitmap to be loaded from somewhere? external library
With Hmg no Problem convert PCX to Bmp,jpeg,.. in Commandline-Mode
you need a special library
TXTMODE -> TextMode() is a function for switching 25x80 28x80 and so on, external library ?
CENTER -> maxcol()/2+1 ? external library ?
SHOWTIME -> Display the time of day / somewhere defined in external library ?
DMISHCAT -> defined in external library not known
ERR_MSG -> external library, ERR_MSG ( 1) ,ERR_MSG (3 ) shows the text for err3.

External library or PRG-File could contain this functions.

For FastPCX you could evtl. use
functions in HBGFX.CH in Harbour/include/hbgfx.ch to show Pictures.

TextMode and so on is Clipper Tools in Harbour/include/hbgtcore.h

vmode12x40()
* vmode25x40()
* vmode28x40()
* vmode50x40()
* vmode12x80()
* vmode25x80()
* vmode28x80()
* vmode43x80()
* vmode50x80()
* hb_gt_SetMode()
* hb_gt_GetDisplay()

Re: A new member from Saudi Arabia

Posted: Thu Jan 17, 2013 8:43 am
by Kahlani
dhaine_adp wrote:Hi Kahlani,
Lines 134, Functions/Procedures 58
Generating C source output to 'C:\Users\mishcat\AppData\Local\Temp\hbmk_oq0ejy.d
ir\accpmenu.c'... Done.
C:/Users/mishcat/AppData/Local/Temp/hbmk_oq0ejy.dir/accpmenu.o:accpmenu.c:(.data
+0x68): undefined reference to `HB_FUN_USE_UDF'
C:/Users/mishcat/AppData/Local/Temp/hbmk_oq0ejy.dir/accpmenu.o:accpmenu.c:(.data
+0x98): undefined reference to `HB_FUN_FASTPCX'
C:/Users/mishcat/AppData/Local/Temp/hbmk_oq0ejy.dir/accpmenu.o:accpmenu.c:(.data
+0xc8): undefined reference to `HB_FUN_TXTMODE'
C:/Users/mishcat/AppData/Local/Temp/hbmk_oq0ejy.dir/accpmenu.o:accpmenu.c:(.data
+0x128): undefined reference to `HB_FUN_CENTER'
C:/Users/mishcat/AppData/Local/Temp/hbmk_oq0ejy.dir/accpmenu.o:accpmenu.c:(.data
+0x178): undefined reference to `HB_FUN_SHOWTIME'
C:/Users/mishcat/AppData/Local/Temp/hbmk_oq0ejy.dir/accpmenu.o:accpmenu.c:(.data
+0x1d8): undefined reference to `HB_FUN_DMISHCAT'
C:/Users/mishcat/AppData/Local/Temp/hbmk_oq0ejy.dir/accpmenu.o:accpmenu.c:(.data
+0x378): undefined reference to `HB_FUN_ERR_MSG'
Is FastPCX(), TxtMode(), Center(), Showtime(), DMISChat() and ERR_Msg() is your UDF or a UDF somewhere from library? If that is the case, link those modules as well or better yet disable or comment-out all UDF calls so you can display your ACCPMENU.Prg Fireup your editor and inspect line number 134. If it fails, build another streamline version of accpmenu.prg without all other library or UDF library calls.

As Leopoldo says, upload your sample program so somebody will be able to help or provide insight on your problem. But it is also great working your way-in to the Harbour/HMG, that definitely shortens the learning curve. You're not alone, we've also come from that similar stage when we started using Harbour and HMG. The key is patience.

To see Harbour, turn 20 degrees port side and bank 45 degrees starboard, then go forward and straight ahead you'll see the lighthouse. :) You are in the right forum.

Regards,

Danny
Hi

Thanks a lot dear. Just as you mentioned correctly, it is a link problem. In another words, I could not direct the linker to right place to pickup the functions. I am trying now!

As I stated early, I am a beginner so your patience will help me to find my way through.

Thanks again for your help,
and have a nice day.

Re: A new member from Saudi Arabia

Posted: Thu Jan 17, 2013 9:42 am
by Kahlani
klauskugel wrote:Hi Kahlani,
the functions you need are for DOS.
And obsolet in Windows. Try to replace them for Windows.

Therefore most of them is placed in Startup-Routine
in GTDOS and NOT in HMG 3.0.39 !!
HMG 3.0.39 uses in BUILD.BAT >> if "%1"=="/d" set gtdrivers=-GTWIN -GTGUI

Therefore you need to REPLACE such functionality.
The GTDOS - Functionality is the OLD DOS Startup, which you want to
get rid off, to use your Program in Windows.

//----------------------------------------------

Remainders of your functions of the old time are found in
Harbour/include/hbgfx.ch
Harbour/include/hbgtcore.h

USE_UDF -> User Defined Function for USE ? external library
FASTPCX -> PCX-Bitmap to be loaded from somewhere? external library
With Hmg no Problem convert PCX to Bmp,jpeg,.. in Commandline-Mode
you need a special library
TXTMODE -> TextMode() is a function for switching 25x80 28x80 and so on, external library ?
CENTER -> maxcol()/2+1 ? external library ?
SHOWTIME -> Display the time of day / somewhere defined in external library ?
DMISHCAT -> defined in external library not known
ERR_MSG -> external library, ERR_MSG ( 1) ,ERR_MSG (3 ) shows the text for err3.

External library or PRG-File could contain this functions.

For FastPCX you could evtl. use
functions in HBGFX.CH in Harbour/include/hbgfx.ch to show Pictures.

TextMode and so on is Clipper Tools in Harbour/include/hbgtcore.h

vmode12x40()
* vmode25x40()
* vmode28x40()
* vmode50x40()
* vmode12x80()
* vmode25x80()
* vmode28x80()
* vmode43x80()
* vmode50x80()
* hb_gt_SetMode()
* hb_gt_GetDisplay()
Hello dear

Thanks a lot! Your comment were very helpful to me and I just realized that it is a link problem. To the that end, for clipper functions, I added the following two lines in my source code "accpmenu.prg" , as follows :

#include "c:\hmg.3.0.39\harbour\include\hbgfx.ch"
#include "c:\hmg.3.0.39\harbour\include\hbgtcore.ch"

Now, I got a message say Compiler could not open those files, nevertheless. I could find them in the include subdirectory.


For my functions, I have they are all included in a file called 'funcs.obj" and also I have the source code for them. I want your suggestion of what I should do so that the linker will see them.


Thank you & Best Regards.

Re: A new member from Saudi Arabia

Posted: Thu Jan 17, 2013 11:13 am
by esgici
Hi Kahlani,

hbgfx.ch and hbgtcore.ch" are standard Harbour header files, so didn't included in HMG package; and in my opinion you don't need them.

If your source code of "funcs.obj" is a .prg ( such as funcs.prg or another else ) you need simply add this .prg file to your build script ( files .hbp or .bat or anything else )

If it isn't .prg or you don't sure what format or language they are, if you will send here may be more easy helping you.

maassalam

Re: A new member from Saudi Arabia

Posted: Sat Jan 19, 2013 4:46 pm
by Kahlani
esgici wrote:Hi Kahlani,

hbgfx.ch and hbgtcore.ch" are standard Harbour header files, so didn't included in HMG package; and in my opinion you don't need them.

If your source code of "funcs.obj" is .prg ( such as funcs.prg or another else ) you need simply add this .prg file to your build script ( files .hbp or .bat or anything else )

If it isn't .prg or you don't sure what format or language they are, if you will send here may be more easy helping you.

maassalam

Dear Sir,

Salamu Alaikum. Thank you very much for your help. I think my problem is that I could not link my functions nor the commen functions. To explain what I mean I got this sample program from "samples", look at it :
#include "hmg.ch"

Function main()

DEFINE WINDOW Form_1 ;
AT 0,0 ;
WIDTH 400 ;
HEIGHT 200 ;
TITLE 'Menu Test' ;
MAIN

DEFINE MAIN MENU

POPUP 'File'

ITEM 'Open' ACTION MsgInfo ('File:Open') IMAGE 'Check.Bmp'
ITEM 'Save' ACTION MsgInfo ('File:Save') IMAGE 'Free.Bmp'
ITEM 'Print' ACTION MsgInfo ('File:Print') IMAGE 'Info.Bmp'
ITEM 'Save As...' ACTION MsgInfo ('File:Save As')
ITEM 'HMG Version' ACTION MsgInfo (HMGVersion())
SEPARATOR
ITEM 'Exit' ACTION MsgInfo ('File:Exit') IMAGE 'Exit.Bmp'

END POPUP

POPUP 'Test'

ITEM 'Item 1' ACTION MsgInfo ('Item 1') name xxx
ITEM 'Item 2' ACTION MsgInfo ('Item 2')

POPUP 'Item 3' name test
ITEM 'Item 3.1' ACTION MsgInfo ('Item 3.1')
ITEM 'Item 3.2' ACTION MsgInfo ('Item 3.2')

POPUP 'Item 3.3'
ITEM 'Item 3.3.1' ACTION MsgInfo ('Item 3.3.1')
ITEM 'Item 3.3.2' ACTION MsgInfo ('Item 3.3.2')

POPUP 'Item 3.3.3'

ITEM 'Item 3.3.3.1' ACTION MsgInfo ('Item 3.3.3.1')
ITEM 'Item 3.3.3.2' ACTION MsgInfo ('Item 3.3.3.2')
ITEM 'Item 3.3.3.3' ACTION MsgInfo ('Item 3.3.3.3')
ITEM 'Item 3.3.3.4' ACTION MsgInfo ('Item 3.3.3.4')
ITEM 'Item 3.3.3.5' ACTION MsgInfo ('Item 3.3.3.5')
ITEM 'Item 3.3.3.6' ACTION MsgInfo ('Item 3.3.3.6')

END POPUP

ITEM 'Item 3.3.4' ACTION MsgInfo ('Item 3.3.4')

END POPUP

END POPUP

ITEM 'Item 4' ACTION MsgInfo ('Item 4')

END POPUP

POPUP 'Help'

ITEM 'About' ACTION MsgInfo ('Help:ABout')

END POPUP

END MENU

DEFINE CONTEXT MENU
ITEM 'Item 1' ACTION MsgInfo ('Item 1')
ITEM 'Item 2' ACTION MsgInfo ('Item 2')
SEPARATOR
ITEM 'Item 3' ACTION MsgInfo ('Item 3')
END MENU

END WINDOW

CENTER WINDOW Form_1

ACTIVATE WINDOW Form_1

Return

I compiled it is as I did with my prorgram ..

hbmk2 demo.prg

and here is what I got ...

C:\hmg.3.0.39\SAMPLES\MENU.1>hbmk2 demo.prg
Harbour 3.1.0dev (Rev. 17036)
Copyright (c) 1999-2011, http://harbour-project.org/
Compiling 'demo.prg'...
demo.prg(1) Error F0029 Can't open #include file 'hmg.ch'
hbmk2: Error: Running Harbour compiler (embedded). 1
(C:\hmg.3.0.39\harbour\bin\harbour.exe) -n2 demo.prg -oC:\Users\mishcat\AppData\
Local\Temp\hbmk_5le4s4.dir\ -iC:\hmg.3.0.39\harbour\include

C:\hmg.3.0.39\SAMPLES\MENU.1>
Please see that error and tell how can I come over it.

Appreciate your assistance.

Re: A new member from Saudi Arabia

Posted: Sat Jan 19, 2013 5:09 pm
by esgici
Aleina ve aleykum salam ya ahi
Kahlani wrote:...I think my problem is that ...
I think your problem is (sorry) don't listening :(

Please look at "Building a HMG application" in the post.

Simply modify :
C:\hmg.3.0.39\SAMPLES\MENU.1>hbmk2 demo.prg
to :

Code: Select all

C:\hmg.3.0.39\SAMPLES\MENU.1>build demo.prg
(Assuming your noticed folder has a file named "build.bat".)

By the way I have a special petition to you : please don't say me "sir"; I'm not a "sir", simply an abd-allah the fakir.

maassalam