I thought this would be simple. (I keep making that mistake ;-) )
I have a Harbour app that I started working on 30 years ago in Clipper S’87. It has always run under Windows. In the current version I’m compiling it with Harbour 3.2-dev and using the GT system to provide a realizable window and this works fine. At the start of the program I have this GT setup:
ANNOUNCE HB_GT_SYS
REQUEST HB_GT_WVT_DEFAULT
// get font size and width from system file
SELECT 1
USE SAILSYS
GO TOP
hb_gtInfo( HB_GTI_FONTSIZE, FONT_SIZE )
hb_gtInfo( HB_GTI_FONTWIDTH, FONT_WIDTH )
hb_gtInfo( HB_GTI_WINTITLE, "Flickerware" )
hb_gtInfo( HB_GTI_ICONFILE, "Flickerware45.ico" )
hb_gtInfo( HB_GTI_FONTNAME, "Consolas" )
hb_gtInfo( HB_GTI_SELECTCOPY, .T. )
hb_gtInfo( HB_GTI_CLOSABLE, .T. )
hb_gtInfo( HB_GTI_RESIZABLE, .T. )
hb_gtInfo( HB_GTI_CODEPAGE, 255 )
hb_gtInfo( HB_GTI_ALTENTER, .T. )
SetMode( 25, 80 )
I compile the program using hbmk2 like this:
hbmk2 sail.prg hbwin.hbc -comp=mingw
This works fine and gives me a readable and resizable window.
Now I’m trying to port the app to Linux. I have it running fine in the terminal. However all my attempts to use the GT system in Linux have issues.
My Linux GT setup is this:
ANNOUNCE HB_GT_SYS
REQUEST HB_GT_XWC_DEFAULT
// get font size and width from system file
SELECT 1
USE SAILSYS
GO TOP
hb_gtInfo( HB_GTI_FONTSIZE, FONT_SIZE )
hb_gtInfo( HB_GTI_FONTWIDTH, FONT_WIDTH )
hb_gtInfo( HB_GTI_WINTITLE, "Flickerware" )
hb_gtInfo( HB_GTI_ICONFILE, "Flickerware45.ico" )
hb_gtInfo( HB_GTI_FONTNAME, "Monospace Regular" )
hb_gtInfo( HB_GTI_SELECTCOPY, .T. )
hb_gtInfo( HB_GTI_CLOSABLE, .T. )
hb_gtInfo( HB_GTI_RESIZABLE, .T. )
hb_gtInfo( HB_GTI_CODEPAGE, 255 )
hb_gtInfo( HB_GTI_ALTENTER, .T. )
SetMode( 25, 80 )
If I compile the app like this:
hbmk2 sail.prg
I get this:
Harbour 3.2.0dev (r2512120309)
Copyright (c) 1999-2025, https://harbour.github.io/
Compiling 'sail.prg'...
Compiling 'SAILPRC.prg'...
Compiling 'SAILAWD.prg'...
Compiling 'SAILSER.prg'...
Compiling 'SAILMNT.prg'...
Compiling 'SAILPHRF.prg'...
Compiling 'SAILFLG.prg'...
Compiling 'SAILHI.prg'...
Lines 573, Functions/Procedures 83
Generating C source output to '/tmp/hbmk_ywsca9.dir/sail.c'... Done.
/usr/bin/ld: /tmp/hbmk_ywsca9.dir/sail.o:(.data.rel+0x1750): undefined reference to `HB_FUN_HB_GT_XWC_DEFAULT'
collect2: error: ld returned 1 exit status
I looked all over the place and could not find any HB_FUN_xxxx files, maybe these are internal functions?
I then tried compiling like this:
hbmk2 -gtxwc sail.prg
This eliminates the compile error and I can actually run my program. It comes up in a very small X11 window. If I resize the window my program doesn’t resize with it, if I make the window even smaller line wraps cause fragmenting of the display. Also my hb_gtInfo options seem to be ignored.
I’m sure I’m showing my ignorance here, I know xBase better than Linux/Unix. I hope what I’m trying to do is understandable. Thanks in advance for any help.
--Bill