RE: [harbour-users] GTGLFW

384 views
Skip to first unread message
Message has been deleted

nbato...@wings.rs

unread,
Oct 3, 2023, 9:25:46 AM10/3/23
to harbou...@googlegroups.com

It looks interesting. It would be helpful if you could send some screenshots...

 

regards, NB

 

From: harbou...@googlegroups.com <harbou...@googlegroups.com> On Behalf Of harbour pl
Sent: Tuesday, October 3, 2023 3:11 PM
To: Harbour Users <harbou...@googlegroups.com>
Subject: [harbour-users] GTGLFW

 

Hi,

GLFW offers access to native functions across various platforms such as WIN32, COCOA, X11, and WAYLAND. These allow for direct interaction with the operating system and low-level window management. These capabilities provide a solid foundation for creating a new graphical GT for Harbour. Below is some example source code.

https://github.com/dev-harbour/gtglfw

I understand that the developers of Harbour may not be interested in creating a new graphical GT, especially since existing GTs like GTXWC or GTWVT are not yet fully completed and may not even be needed. Nevertheless, I would like to draw attention to the potential of creating a new GTGLFW as a simple and effective solution.

I look forward to your opinions in the comments.

--Rafał Jopek
harbour.pl

--
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: https://groups.google.com/group/harbour-users
---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/harbour-users/316ab09b-89b7-4e73-9897-e86595a7faabn%40googlegroups.com.

Message has been deleted
Message has been deleted

Angel Pais

unread,
Oct 6, 2023, 8:24:14 AM10/6/23
to harbou...@googlegroups.com
Hi Rafal

Are you planning to make this wvt/wvg compatible ?

Regards
Angel


El vie, 6 oct 2023 a las 7:20, harbour pl (<rafal...@hotmail.com>) escribió:
Dear Harbour Community Members,

I would like to introduce you to the GTGLFW project, a library that aims to simplify window creation and event handling in Harbour.
This project offers a starting point for anyone interested in graphical applications within Harbour.

About GTGLFW:
Basic and Example-Based: The library is designed to be straightforward and comes with example codes for better understanding.
Utilizes GLFW and X11: GTGLFW leverages GLFW for window management and X11 for additional functionalities.
Native Function Support: The library incorporates native functions from "glfw3native.h," allowing for enhanced customization and control.

Why Your Involvement is Important:
The project is still in its early stages, and any contributions from the community will be highly beneficial for its growth. Whether it’s contributing code,
improving documentation, or providing general guidance, your support would be highly appreciated.

We welcome anyone interested to join us in enhancing this tool for the Harbour ecosystem.

--Rafał Jopek
harbour.pl

DrawTextXft.png
wtorek, 3 października 2023 o 17:20:22 UTC+2 harbour pl napisał(a):
Thank you for your interest. Currently, it's just basic window tests, so there's not much to show in screenshots yet.
I plan to develop the project further and will definitely share more materials as it progresses.

gtglfw.png

Alain Aupeix

unread,
Oct 6, 2023, 11:25:19 AM10/6/23
to harbou...@googlegroups.com, harbour pl
Le 06/10/2023 à 12:20, harbour pl a écrit :
Dear Harbour Community Members,

I would like to introduce you to the GTGLFW project, a library that aims to simplify window creation and event handling in Harbour.
This project offers a starting point for anyone interested in graphical applications within Harbour.

About GTGLFW:
Basic and Example-Based: The library is designed to be straightforward and comes with example codes for better understanding.
Utilizes GLFW and X11: GTGLFW leverages GLFW for window management and X11 for additional functionalities.
Native Function Support: The library incorporates native functions from "glfw3native.h," allowing for enhanced customization and control.

Why Your Involvement is Important:
The project is still in its early stages, and any contributions from the community will be highly beneficial for its growth. Whether it’s contributing code,
improving documentation, or providing general guidance, your support would be highly appreciated.

We welcome anyone interested to join us in enhancing this tool for the Harbour ecosystem.

--Rafał Jopek
harbour.pl

Hi rafa,

I tried to build under xubuntu 16.04,n and it fails :

alain@Gramps-JujuLand2:/opt/TuxPrograms/trunks/gtglfw$ hbmk2 gtglfw.hbp
hbmk2: Compilation...
In file included from ../../../../../../src/gtglfw.c:5:0:
../../../../../../include/gtglfw.h:16:24: fatal error: GLFW/glfw3.h: Aucun fichier ou dossier de ce type
compilation terminated.
hbmk2[gtglfw]: Erreur: Exécution du compilateur C/C++. 1
gcc -c -O3  -I/usr/include/uuid -W -Wall -pipe -I/usr/include/harbour -I/usr/include/freetype2 -I/usr/include/libpng16 -I../../../../../../include ../../../../../../src/gtglfw.c

Thanks
A+
-

Alain Aupeix
Sites web : JujuLand | Pissobi-Lacassagne | Gadel
X.ubuntu 16.04 | H.arbour 3.2.0-1 (r2023-07-07 00:07) | Hw.gui 2.23-5dev (r3340) | G.ramps 5.1.2


Message has been deleted

Alain Aupeix

unread,
Oct 6, 2023, 11:50:36 AM10/6/23
to harbou...@googlegroups.com, harbour pl
Le 06/10/2023 à 17:43, harbour pl a écrit :
Dear Alain and Angel,

Thank you for your interest in GTGLFW and for taking the time to try out the build process.
The error message indicates that the GLFW library is not installed or not found in the include paths.

You can install GLFW by running the following commands on a Debian-based system like Xubuntu:
sudo apt-get update
sudo apt-get install libglfw3-dev

After installing GLFW, you can try building the project again.
Let me know if you continue to encounter issues.

Hi,

After installing the deb, I have these errors:

alain@Gramps-JujuLand2:/opt/TuxPrograms/trunks/gtglfw$ hbmk2 gtglfw.hbp
hbmk2: Compilation...

In file included from ../../../../../../include/gtglfw.h:17:0,
                 from ../../../../../../src/gtglfw.c:5:
/usr/include/GLFW/glfw3native.h:102:3: error: #error "No context API selected"
  #error "No context API selected"
   ^
../../../../../../src/gtglfw.c: In function ‘HB_FUN_CREATEWINDOW’:
../../../../../../src/gtglfw.c:110:37: error: ‘GLFW_NO_API’ undeclared (first use in this function)
    glfwWindowHint( GLFW_CLIENT_API, GLFW_NO_API );
                                     ^
../../../../../../src/gtglfw.c:110:37: note: each undeclared identifier is reported only once for each function it appears in
../../../../../../src/gtglfw.c:130:4: warning: implicit declaration of function ‘glfwSetWindowMaximizeCallback’ [-Wimplicit-function-declaration]
    glfwSetWindowMaximizeCallback( wnd->window, window_maximize_callback );
    ^
../../../../../../src/gtglfw.c:132:4: warning: implicit declaration of function ‘glfwSetWindowSizeLimits’ [-Wimplicit-function-declaration]
    glfwSetWindowSizeLimits( wnd->window, wnd->width, wnd->height, GLFW_DONT_CARE , GLFW_DONT_CARE )
    ^


hbmk2[gtglfw]: Erreur: Exécution du compilateur C/C++. 1
gcc -c -O3  -I/usr/include/uuid -W -Wall -pipe -I/usr/include/harbour -I/usr/include/freetype2 -I/usr/include/libpng16 -I../../../../../../include ../../../../../../src/gtglfw.c


Thanks
A+
--
Message has been deleted

Alain Aupeix

unread,
Oct 7, 2023, 5:09:21 AM10/7/23
to harbour pl, Harbour Users
Le 06/10/2023 à 18:16, Alain Aupeix a écrit :
Probably the problem, as the last version is:

The current version is 3.3.8, which was released on

I have

cloned the last version :

build it :
  • cmake CMakeLists.txt
  • sudo make
installed it :
  • sudo make install
After that, I tried to build again, it builds, but building main.prg, if fails :

hbmk2: Traitement du script de fabrication local: hbmk.hbm
Harbour 3.2.0dev (r2307062207)
Copyright (c) 1999-2021, https://harbour.github.io/
Compiling 'main.prg'...
Lines 24, Functions/Procedures 1
Generating C source output to '/tmp/hbmk_ito04e.dir/main.c'... Done.
/usr/lib/harbour/libgtglfw.a(gtglfw.o) : Dans la fonction « HB_FUN_CREATEWINDOW » :
gtglfw.c:(.text+0x25a) : référence indéfinie vers « glfwSetWindowMaximizeCallback »
gtglfw.c:(.text+0x271) : référence indéfinie vers « glfwSetWindowSizeLimits »
collect2: error: ld returned 1 exit status
hbmk2: Erreur: Exécution de l'éditeur des liens. 1
gcc '/tmp/hbmk_ito04e.dir/main.o' '/tmp/hbmk_ito04e.dir/hbmk_h08vto.o'   -Wl,--start-group -lgtglfw -lglfw -lX11 -lXft -lhbcplr -lhbdebug -lharbour   -Wl,--end-group -omain -L/usr/lib/harbour -L/usr/local/lib

hbmk2: Erreur: Référencée(s), manquante(s), mais fonction(s) inconnue(s):
       CREATEWINDOW()

Message has been deleted

José M. C. Quintas

unread,
Oct 7, 2023, 9:15:05 PM10/7/23
to harbou...@googlegroups.com

create a workflow on github.

examples, but not normal use:

build harbour 3.2 and hwgui on ubuntu:

https://github.com/JoseQuintas/hwgui/blob/main/.github/workflows/checkubuntu.yml

zip of mingw 7.3

https://github.com/JoseQuintas/sefazclass/blob/master/.github/workflows/mingw_0703.yml

zip of harbour 3.2

https://github.com/JoseQuintas/sefazclass/blob/master/.github/workflows/hb32_0703.yml

zip of harbour 3.2 + hwgui + hmg 3 + hmg extended + oohg + others

https://github.com/JoseQuintas/sefazclass/blob/master/.github/workflows/hb32pack.yml

github rule: workflow zips are not public available

You can check about packages, I do not do this because I do not want to do distribuition

public use is free.

how to use:

create yml file on .github/workflows

execution is visible on actions:  https://github.com/JoseQuintas/sefazclass/actions

can be on click, on commit, or on time interval


José M. C. Quintas


Em 07/10/2023 11:37, harbour pl escreveu:
Dear Alain,

To compile the library, please follow the procedure outlined under "Installing on Linux":

For Debian:
sudo apt-get update
sudo apt-get install libglfw3-dev libx11-dev
Building
To build the static library, execute:
hbmk2 gtglfw.hbp
To build and run samples and test code, navigate to the examples directory and execute:
cd examples
hbmk2 main.prg
If you are encountering linking issues, consider modifying the examples/hbmk.hbm file. Change the line from:
gtglfw.hbc
to:
../gtglfw.hbc

This may resolve the issue.
Library Paths
Make sure the library paths are correctly set. The -L flag appears to be set
for directories /usr/lib/harbour and /usr/local/lib. Ensure that the required libraries are actually located in these directories.

--Rafał Jopek
harbour.pl
--
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: https://groups.google.com/group/harbour-users
---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.

jmcqu...@gmail.com

unread,
Oct 7, 2023, 9:30:49 PM10/7/23
to Harbour Users
forgot on this:

zip of harbour 3.2 + hwgui + hmg 3 + hmg extended + oohg + others

https://github.com/JoseQuintas/sefazclass/blob/master/.github/workflows/hb32pack.yml

Last ones are about this:

https://github.com/JoseQuintas/dlgauto

It compiles this project using hwgui, hmg 3, hmg extended, oohg and gtwvg !!!

Not sure if GTGLFW can be the next on list.

José M. C. Quintas


Message has been deleted

Alain Aupeix

unread,
Oct 9, 2023, 3:39:29 AM10/9/23
to harbou...@googlegroups.com, harbour pl
Le 07/10/2023 à 16:37, harbour pl a écrit :
Dear Alain,

To compile the library, please follow the procedure outlined under "Installing on Linux":

For Debian:
sudo apt-get update

sudo apt-get install libglfw3-dev libx11-dev
Building
To build the static library, execute:
hbmk2 gtglfw.hbp
To build and run samples and test code, navigate to the examples directory and execute:
cd examples
hbmk2 main.prg
If you are encountering linking issues, consider modifying the examples/hbmk.hbm file. Change the line from:
gtglfw.hbc
to:
../gtglfw.hbc

This may resolve the issue.
Library Paths
Make sure the library paths are correctly set. The -L flag appears to be set
for directories /usr/lib/harbour and /usr/local/lib. Ensure that the required libraries are actually located in these directories.

All is ok, except that I haven't /usr/include/libpng16

I have libpng12 and libpng which is a link to libpng12

So I installed  libpng16-16 and libpng16-dev

I rebuild gtglfw

And now, when I build main.prg, I have an new error :

alain@Gramps-JujuLand2:/opt/TuxPrograms/trunks/gtglfw/examples$ hbmk2 mainhbmk2: Traitement du script de fabrication local: hbmk.hbm


Harbour 3.2.0dev (r2307062207)
Copyright (c) 1999-2021, https://harbour.github.io/
Compiling 'main.prg'...
Lines 24, Functions/Procedures 1

Generating C source output to '/tmp/hbmk_443xxm.dir/main.c'... Done.
/usr/bin/ld : ne peut trouver -lXft


collect2: error: ld returned 1 exit status
hbmk2: Erreur: Exécution de l'éditeur des liens. 1

gcc '/tmp/hbmk_443xxm.dir/main.o' '/tmp/hbmk_443xxm.dir/hbmk_iaj6ah.o'   -Wl,--start-group -lgtglfw -lglfw -lX11 -lXft -lhbcplr -lhbdebug -lharbour   -Wl,--end-group -omain -L/usr/lib/harbour -L../lib/linux/gcc -L/usr/local/lib

Having a look, I found :

alain@Gramps-JujuLand2:/opt/TuxPrograms/trunks/gtglfw/examples$ paquet libxft
ii  libxft2:amd64                                 2.3.2-1                                              amd64        FreeType-based font drawing library for X

Thanks
A+

--Rafał Jopek
harbour.pl
sobota, 7 października 2023 o 11:09:21 UTC+2 Alain Aupeix napisał(a):
--
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: https://groups.google.com/group/harbour-users
---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.
Message has been deleted

Domenico D'Oria

unread,
Oct 9, 2023, 10:54:32 AM10/9/23
to Harbour Users
good mornig Rafal, i have debian 11 bullseye and harbour r2305191429, and all is working fine, library generated ok, examples compiled and whithout any problem

many thanks for your big effort

Il giorno lunedì 9 ottobre 2023 alle 09:54:13 UTC+2 harbour pl ha scritto:
Hi Alain,

It seems like you're encountering a linking issue with the Xft library while building the example program.
Here are some suggestions that might help you resolve this issue:
Install the Development Package: You mentioned you have libxft2 installed, but you might also need the development files usually provided in a -dev package.
You can install it using the following command:

sudo apt-get install libxft-dev

Library Path: If libxft is installed in a non-standard directory, you can update your LD_LIBRARY_PATH
environment variable or use the -L option with gcc during compilation to specify where the compiler should look for the library.

Check Linking: Use the command ldconfig -p | grep Xft to check if libXft is available for the linker.

--Rafał Jopek
Reply all
Reply to author
Forward
Message has been deleted
0 new messages