telegram bot with harbour

854 views
Skip to first unread message

Riztan Gutierrez

unread,
Sep 26, 2020, 2:26:35 AM9/26/20
to harbou...@googlegroups.com
Hello harbour friends.
Sorry for being so disconnected lately, the situation in my country is a bit delicate and it is difficult to take time to participate in discussions.

I just wanted to comment that if there are some telegram users around here, and they want to play a little developing their own chatbot with Harbour, I leave you a link to a little work done that I hope will be useful.

I have only tested on GNU/Linux but very possibly it works on Windows.

Greetings!


____________________________________
Spanish:

Hola amigos de harbour.
Disculpen por estar tan desconectado últimamente, la situación en mi país es un tanto delicada y se hace difícil dedicar tiempo para participar en las discusiones.

Solo quería comentar que si hay algunos usuarios de telegram por acá, y quieren jugar un poco desarrollando su propio chatbot con Harbour, os dejo un enlace a un pequeño trabajo realizado que espero sea de utilidad.

Solo he testeado en GNU/Linux pero muy posiblemente funcione en Windows.

Saludos!

--

fdaniele

unread,
Sep 26, 2020, 2:35:31 AM9/26/20
to Harbour Users
great idea !! i like Telegram

Thanks

Daniele


Pritpal Bedi

unread,
Sep 26, 2020, 8:47:34 PM9/26/20
to Harbour Users
Hi Riztan

Good contribution to Harbour users, thanks.

Can you enumerate use cases where Telegram may be useful in business applications ? WhatsApp API is useful in the sense that you can deliver the message to your clients, like payments, sales, etc, notifications, directly in their inbox. In Telegram's bot the same client has to query the boat to materialize same effect. So my curiosity is how you are using bots in your applications. Enumerating use cases can greatly help Harboureans to get benefits of this technology.

Pritpal Bedi
a student of software analysis & concepts

Riztan Gutierrez

unread,
Sep 26, 2020, 11:26:27 PM9/26/20
to harbou...@googlegroups.com
Hello pritpal,
Like what you said about whatsapp (I don't know that api) you can automate the processing and delivery of documents to a contact, group or channel.

Telegram offers a complete API for bot processing and also for customer processing (still to be explored). https://core.telegram.org/api

A few months ago I was doing some integration tests between an ERP and a bot (to be continued). Offering managers to request the information they usually ask to their assistants, at that time a combined work with https://www.chartjs.org/ (I made a class to use chartjs, at any time I clean it a little and I publish it too)

At this time in my country, due to the terrible war situation, the use of groups to publish products for sale by the common citizen has proliferated greatly. Some friends have asked me for a tool to help in this management, so I started the development of a bot called @MegaOfferBot that allows people to post ads and see the ads of others, helps establish contact, etc. You can also do some advertising of these ads in channels and user groups where the bot is a member.

Recently I have done the integration with wit.ai allowing the bot to recognize voice messages, I think this will give it an extra added value. By also integrating with a "texttospeech", I think it adds even more value.

Integration can be done with virtual stores, transportation systems, management of alerts in industrial processes, health systems, security.

I think there are many possible applications.

In countries where internet access is low quality/speed or limited by data volume, accessing directly to the necessary information without so much css and html, chatbos are a good and economical alternative. Telegram bots are easy to set up and it is not essential to purchase hosting services to make them work. Only computer, harbour and internet access ;)

Greetings!

Additional note: I use for the translation deepl.com that also has an API that could be integrated into some bot made with harbour, maybe I send you a voice message in Spanish and you receive a voice message in English and vice versa.  ;)

Translated with www.DeepL.com/Translator (free version)
________________________________________

Original (Spanish).

Hola pritpal,
Al igual de lo que has comentado de whatsapp (no conozco ese api) se puede automatizar elaboración y entrega de documentos a un contacto, grupo o canal.

Telegram ofrece un completo API para elaboración de bot y también para elaboración de cliente (todavía por explorar).

Hace unos meses estuve haciendo unas pruebas de integración entre un ERP y un bot (por continuar). Ofreciendo a los gerentes solicitar la información que por lo general piden a sus asistentes, en ese momento un trabajo combinado con https://www.chartjs.org/  (hice una clase para uso de chartjs, en cualquier momento la limpio un poco y publico también)

En este momento en mi país debido a la terrible situación de guerra, ha proliferado mucho el uso de grupos para publicar productos a la venta por el ciudadano común. Unos amigos me han solicitado una herramienta que permita ayudar en esta gestión, de esta forma inicié el desarrollo de un bot llamado @MegaOfertaBot que permite a las personas publicar anuncios y ver los anuncios de otras, ayuda a establecer el contacto, etc. También puede hacer algo de publicidad de estos anuncios en canales y grupos de usuarios donde el bot sea integrante.

Recientemente he realizado la integración con wit.ai permitiendo al bot reconocer mensajes de voz, creo que esto le un valor agregado extra. Al integrar también con un "texttospeech", creo le agrega aún más valor.

Se puede hacer integración con tiendas virtuales, sistemas de transporte, gestión de alertas en procesos industriales, sistemas de salud, seguridad.

Creo que hay muchas posibles aplicaciones.

En los paises donde el acceso a internet es de baja calidad/velocidad o limitado por volumen de datos, acceder directamente a la información necesaria sin tanto css y html, los chatbos son una buena y económica alternativa. Los bots de telegram son fáciles de elaborar y no es indispensable adquirir servicios de alojamiento para hacerlos funcionar. Solo computador, harbour y acceso a internet ;)

Saludos!

Nota adicional: Utilizo para la traducción deepl.com que también tiene un API que se podría igualmente integrar en algún bot hecho con harbour, quizás le envío un mensaje de voz en español y ud reciba un mensaje de voz en inglés y viceversa.  ;)


--
--
You received this message because you are subscribed to the Google
Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: http://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/8528a5f4-cfe6-4a93-bac8-a2463f177ac2n%40googlegroups.com.


--


 Riztan Gutiérrez                     www.gtxbase.org                              www.gtkbase.org

  • Linux User: # 494267
  • Ubuntu User: # 28329


Riztan Gutierrez

unread,
Sep 26, 2020, 11:40:51 PM9/26/20
to harbou...@googlegroups.com
I hope it will be very useful to you.
My alias in telegram: @riztan

Mario H. Sabado

unread,
Sep 27, 2020, 6:47:25 AM9/27/20
to 'elch' via Harbour Users
Hi Riztan,

Thank you for sharing your work and experience with telegram bot.  This will surely be very helpful to the Harbour community.

Keep up the good work.

Best regards,
Mario


Jayadev U

unread,
Sep 28, 2020, 12:20:42 AM9/28/20
to harbou...@googlegroups.com

Dear Pritpalji,

 

Which Whatsapp API is available for integration with Harbour, have you developed something ? Will you please share, this  (whatsapp integration) is one of the biggest requirements of clients now.

 

Warm regards,

 

Jayadev

--

Pritpal Bedi

unread,
Sep 28, 2020, 2:13:02 PM9/28/20
to Harbour Users
Yes, of course. I will be experimenting with your implementation in coming week and will ping @ritzan from within Harbour.


Pritpal Bedi
a student of software analysis & concepts

Pritpal Bedi

unread,
Sep 28, 2020, 2:16:17 PM9/28/20
to Harbour Users
Hi Jayadev

WhatsApp has very rigid standards and I have found it unuasable in real business scenario unless you setup communication servers for each client. Thats why I asked more on Telegram implementation. Let me experiment and wil publish the results here, with the help of Ritzan.


Pritpal Bedi
a student of software analysis & concepts

Riztan Gutierrez

unread,
Sep 29, 2020, 12:21:34 AM9/29/20
to harbou...@googlegroups.com
Mario, Mario, let's hope so.

Pritpal, in telegram, the bots can not start a conversation, it is necessary that the person adds the bot to its contacts so that from that moment and the bot can send some message. ;)

Also, we will wait for the bot's name to be reported to us to add it to the contacts.

Some tips:
- There is a limit of 20 bots per telegram user.
- The bots are public, anyone can add them to the contacts. However, the bot can decide who to reply to and who not to.
- Audios, Videos, voice/video notes, multimedia when sent, get a file_id. Once you have that file_id, you can always reuse it without having to resend the file. However, that file_id is visible and unique to that bot. If you create another bot and try to send another bot's file_id, you will receive an error message.
- There is a limit of messages that a bot can send to a user in one minute. At this time I don't remember how many there are.

Here I have added a little explanation of the example in hbtelegram recently updated. https://riztan.github.io/ (I hope the translation is acceptable, corrections accepted)

________________________________________
Original Spanish:

Pritpal, en telegram, los bots no pueden iniciar una conversación, es necesario que la persona agregue el bot a sus contactos para que desde ese momento ya el bot pueda enviar algún mensaje. ;)

Igualmente esperaremos nos informes el nombre del bot para agregarlo a los contactos.

Algunos tips:
- Hay un límite de 20 bots por usuario de telegram.
- Los bots son públicos, cualquiera puede agregarlos a los contactos. Sin embargo, el bot puede decidir a quien responder y a quien no.
- Audios, Videos, notas de voz/video, multimedia cuando son enviados, obtienen un file_id. Una vez se tiene ese file_id, siempre se puede reutilizar sin necesidad de reenviar el fichero. Sin embargo, ese file_id es visible y único para ese bot. Si creas otro bot e intentas enviar el file_id de otro, recibirás un mensaje de error.
- Hay un limite de mensajes que puede enviar un bot a un usuario en un minuto. En este momento no recuerdo cuantos son.

Acá he agregado un poco la explicación del ejemplo en hbtelegram recientemente actualizado. https://riztan.github.io/ (espero la traducción sea aceptable, se aceptan correcciones)



--
--
You received this message because you are subscribed to the Google
Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: http://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.

Pritpal Bedi

unread,
Sep 29, 2020, 3:01:05 AM9/29/20
to Harbour Users
Extremely knowledable documentation, top-calls. Thanks Riztan.

I just created VouchErpBot. Nothing done except creating one. Even before compiling your code. Add it to your contacts if possible. Would like to test few senarios and am sure your knowledge about the subject will let me to explore possibiities I am looking for my cloud offering - a communication hub for transactional notifications to end-users of my erp clients.

I am eager to read more of your article.

Pritpal Bedi
a student of software analysis & concepts 

Riztan Gutierrez

unread,
Sep 29, 2020, 11:06:02 AM9/29/20
to harbou...@googlegroups.com
ready, I added @VouchERPBot to my contacts. ;)

Pritpal Bedi

unread,
Sep 29, 2020, 12:59:11 PM9/29/20
to Harbour Users
Hi Riztan

I am struck at linking bot.prg on ubuntu and have not been able to figure-out how to resolve. It is a linker issue which is not able to locate -lcurl whereas hbcurl is compiled properly and hbcurl/tests/ftp_uldl.prg is linked ok and executes ok. The following is the last part of link process - NOTE: -lcurl is in the command. This is first time I played with hbcurl and so have lost.

...
/develop/harbour/lib/linux/gcc/libhbcurl.a(core.o): In function `HB_FUN_CURL_ESCAPE':
core.c:(.text+0x42a6): undefined reference to `curl_free'
/develop/harbour/lib/linux/gcc/libhbcurl.a(core.o): In function `HB_FUN_CURL_UNESCAPE':
core.c:(.text+0x4316): undefined reference to `curl_free'
collect2: error: ld returned 1 exit status
hbmk2: Error: Running linker. 1
gcc '/tmp/hbmk_146owG.dir/bot.o' '/tmp/hbmk_146owG.dir/hbmk_ccq4yV.o'   -Wl,--start-group -lhbcurl -lcurl -lhbtelegram -lxhb -lhbct -lhbtip -lhbfship -lhbxpp -lhbextern -lhbdebug -lhbvm -lhbrtl -lhblang -lhbcpage -lgtcgi -lgtpca -lgtstd -lgttrm -lhbrdd -lhbuddall -lhbusrrdd -lrddntx -lrddcdx -lrddnsx -lrddfpt -lhbrdd -lhbhsx -lhbsix -lhbmacro -lhbcplr -lhbpp -lhbcommon -lm -ldl -lrt -lhbpcre -lhbzlib   -Wl,--end-group -obot -L/develop/harbour/lib/linux/gcc

hbmk2: Hint: Add option 'hbcurl.hbc' for missing function(s):
       curl_global_cleanup(), curl_unescape(), curl_escape(), curl_getdate(),
       curl_easy_strerror(), curl_version_info(), curl_version(),
       curl_easy_unescape(), curl_easy_escape(), curl_easy_getinfo(),
       curl_easy_setopt(), curl_easy_recv(), curl_easy_send(),
       curl_easy_perform(), curl_easy_pause(), curl_easy_duplicate(),
       curl_easy_init(), curl_global_init()



Pritpal Bedi
a student of software analysis & concepts

Pritpal Bedi

unread,
Sep 29, 2020, 1:10:47 PM9/29/20
to Harbour Users
And this is the begining of the trace:


... /develop/harbour/contrib/hbtelegram/tests$ hbmk2 bot
hbmk2: Processing local make script: hbmk.hbm
Harbour 3.2.0dev (r1708131853)
Copyright (c) 1999-2016, http://harbour-project.org/
Compiling 'bot.prg'...
Lines 324, Functions/Procedures 4
Generating C source output to '/tmp/hbmk_eEmGGb.dir/bot.c'... Done.
/develop/harbour/lib/linux/gcc/libhbcurl.a(core.o): In function `PHB_CURL_free':
core.c:(.text+0x468): undefined reference to `curl_easy_setopt'
...
.....

Pritpal Bedi

Riztan Gutierrez

unread,
Sep 29, 2020, 3:34:32 PM9/29/20
to harbou...@googlegroups.com
Hi,
Maybe you should update libcurl, which version do you have?
I currently have 7.47

I remember that a few months ago I had to update curl in Windows because of a similar problem.

I just updated harbour trying to recreate the problem and everything is apparently fine.


hbmk2: Procesando script local: hbmk.hbm
Harbour 3.2.0dev (r2004201301)
Copyright (c) 1999-2020, https://harbour.github.io/
Compiling 'bot.prg'...
Lines 323, Functions/Procedures 4
Generating C source output to '/tmp/hbmk_13u25q.dir/bot.c'... Done.

Pritpal Bedi

unread,
Sep 29, 2020, 5:45:37 PM9/29/20
to Harbour Users
Hi Riztan

It is not an issue with curl version. It is issue with interplay of .hbm .hbc interplay which cannot localte libcurl.a or .so (  not sure what it should be ). Tests in contrib/hbcurl/tests/ work fine. I am simply missing where I can locate libcurl.a.

I am not interested on Windows, need help for Linux. Any Linux user ?


Pritpal Bedi

jgt

unread,
Sep 29, 2020, 6:12:20 PM9/29/20
to Harbour Users
It depends upon which distribution.
On Suse 15.1 is /usr/lib64/libcurl.so.4
On Mint 19.3 is /usr/lib/x86_64-linux-gnu/libcurl.so.4
You might have to copy or link to /usr/lib
There is no libcurl.a on either of those distributions.

Domenico D'Oria

unread,
Oct 9, 2020, 12:47:11 PM10/9/20
to Harbour Users
Hi Riztan Gutierrez

first many thanks for your effort

i have an Ubuntu server 20.04, harbour last commit r2008190002

i have compiled succesfully and after a symbolic link to /usr/local/lib/harbour of libhbtelegram.a the test works

after the telegram user i have imported the bot_father the program correctly send the message to all telegram users that have the bot_father in his addressbook.

the question is : how to send a message only at one specific address ( i have not take a look to class source )

this is important for example if want to send to a single user a code fo two way autentication.

regards
Domenico

--------------------------------------------------------------------
Hola Ritzan

primero muchissimas gracias por el monton de trabajo que has hecho

despues algunos problemitos el test funciona.

despues que el usuario telegram ha buscado y inserido la direcion de el bot_padre el programa bot ha espedido corectamente el mensaje, pero pienso que lo invie a todos los usuarios que tiene en la lista esto bot_padre

la preguta es como puedo enviar un mensaje solo a un usuario ( soy sincero non he mirado el source de la clase )

esto puede ser importante por ejemplo si tu quieres eviar al usuario un codigo por la autenticacion a dos vias.

Domenico

Riztan Gutierrez

unread,
Oct 10, 2020, 12:39:41 PM10/10/20
to harbou...@googlegroups.com
Hi Domenico, every user, chat, group, channel has an id.  If you have identified to whom to send, then simply: oBot:sendMessage( ID, "my message" )

To know the id of a user, the user must first write to the bot. That way you get the necessary data and possibly save it.

It is important to know that a telegram bot cannot start a conversation with a user, the person must first start a conversation with the bot through the instruction: /start. At that time, the bot receives an "update" message type https://core.telegram.org/bots/api#message

At the "/start" instruction, the bots usually deliver a welcome message and some instructions for use, and internally save this person's data to send some future notification.

id of the user who sent the message or command: oUpdate:from:id

It is possible that the message originated in a group of users, depending on the need, you may want to respond in the group or privately to the user, if the bot will respond in the group then you should use the id: oUpdate:message:chat:id

___________________________________________

Spanish.

Hola Domenico, cada usuario, chat, grupo, canal tiene un id.  Si tienes identificado el a quien envíar, entonces simplemente: oBot:sendMessage( ID, "mi mensaje" )

Para conocer el id de un usuario, el usuario debe primero escribir al bot. De esa forma obtiene los datos necesarios y que posiblemente debes guardar.

Es importante saber que un bot de telegram no puede iniciar una conversación con un usuario, la persona debe primero iniciar conversación con el bot a través de la instrucción: /start. En ese momento, el bot recibe un "update" tipo mensaje https://core.telegram.org/bots/api#message

Ante la instrucción "/start", los bots suelen entregar un mensaje de bienvenida y algunas instrucciones de uso, e internamente guarda los datos de esta persona para enviar alguna notificación a futuro.

id del usuario que ha enviado el mensaje o comando: oUpdate:from:id

Es posible que el mensaje se originó en un grupo de usuarios, según la necesidad, es posible que se quiera responder en el grupo o en privado al usuario, si el bot responderá en el grupo entonces debe usar el id: oUpdate:message:chat:id


Vikram Chhajer

unread,
Aug 22, 2021, 2:52:26 AM8/22/21
to Harbour Users
Hello Experts 
Can you share me the full code of telegram so can use in my harbour application 

Thanks 

Vikam chhajer

Riztan Gutierrez

unread,
Aug 23, 2021, 9:53:16 PM8/23/21
to harbou...@googlegroups.com

I hope it will be useful.

--
--
You received this message because you are subscribed to the Google
Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: http://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.


--
________________________________________
Riztan Gutierrez
                     _ _                 
  ___  _ __ ___  ___(_) |_    ___   __ _   
 / _ \| '__/ __|/ _ \ | __|  / __| / _` |  
| (_) | |  \__ \  __/ | |_  | (__ | (_| |_
 \___/|_|  |___/\___|_|\__/  \___(_)__,_(_)

Vikram Chhajer

unread,
Aug 25, 2021, 1:22:04 AM8/25/21
to Harbour Users

Hello Riztan

while compling getting error


Lines 327, Functions/Procedures 4
Generating C source output to '.hbmk\win\mingw\bot.c'... Done.
hbmk2: Compiling...
hbmk2: Linking... main.exe
c:/hb32/comp/mingw/bin/../lib/gcc/mingw32/4.6.1-dw2/../../../../mingw32/bin/ld.exe: cannot find -llibcurl
c:/hb32/comp/mingw/bin/../lib/gcc/mingw32/4.6.1-dw2/../../../../mingw32/bin/ld.exe: cannot find -lhbtelegram
collect2: ld returned 1 exit status
hbmk2[main]: Error: Running linker. 1


using harbour 3.2 

Please help to solve the issue

vikram

Riztan Gutierrez

unread,
Aug 27, 2021, 11:20:27 AM8/27/21
to harbou...@googlegroups.com
Vikram, check that libcurl and libhbtelegram are next to the other libraries in the lib folder in harbour.

Vikram Chhajer

unread,
Jan 19, 2023, 11:15:30 PM1/19/23
to Harbour Users
Hello Riztan 
couldn't find  hbtelegram.hbc  and  libhbtelegram  please share this libaray

Thanks 
Vikram 

Riztan Gutierrez

unread,
Jan 20, 2023, 4:46:09 PM1/20/23
to harbou...@googlegroups.com
Hi friend, hbtelegram.hbc is in the repository; the library you must build.
________________
Hola amigo, hbtelegram.hbc está en el repositorio; la librería debes construirla.

El vie, 20 ene 2023 a las 0:15, Vikram Chhajer (<vikram...@gmail.com>) escribió:
Hello Riztan 
couldn't find  hbtelegram.hbc  and  libhbtelegram  please share this libaray

Thanks 
Vikram 

On Friday, 27 August 2021 at 20:50:27 UTC+5:30 Riztan Gutierrez wrote:
Vikram, check that libcurl and libhbtelegram are next to the other libraries in the lib folder in harbour.


El mié, 25 ago 2021 a las 1:22, Vikram Chhajer (<vikram...@gmail.com>) escribió:

Hello Riztan

while compling getting error


Lines 327, Functions/Procedures 4
Generating C source output to '.hbmk\win\mingw\bot.c'... Done.
hbmk2: Compiling...
hbmk2: Linking... main.exe
c:/hb32/comp/mingw/bin/../lib/gcc/mingw32/4.6.1-dw2/../../../../mingw32/bin/ld.exe: cannot find -llibcurl
c:/hb32/comp/mingw/bin/../lib/gcc/mingw32/4.6.1-dw2/../../../../mingw32/bin/ld.exe: cannot find -lhbtelegram
collect2: ld returned 1 exit status
hbmk2[main]: Error: Running linker. 1


using harbour 3.2 

Please help to solve the issue

vikram


--
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com

---
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.

fdaniele

unread,
Jan 22, 2023, 2:38:04 AM1/22/23
to Harbour Users
sorry mr.  Gutierrez but whei i compile with   hbmk2 hbtelegram.hbp this error show:

hbmk2 hbtelegram.hbp
hbmk2: Compilazione dei sorgenti Harbour in corso...
Harbour 3.2.0dev (r2011030937)

Copyright (c) 1999-2020, https://harbour.github.io/
Compiling 'tlgrm_class.prg'...
tlgrm_class.prg(1153) Warning W0001  Ambiguous reference 'OERR'
tlgrm_class.prg(1154) Warning W0001  Ambiguous reference 'OERR'
tlgrm_class.prg(1154) Warning W0001  Ambiguous reference 'CTEXT'
tlgrm_class.prg(1155) Warning W0001  Ambiguous reference 'CTEXT'
tlgrm_class.prg(1155) Warning W0001  Ambiguous reference 'OERR'
tlgrm_class.prg(1155) Warning W0001  Ambiguous reference 'CTEXT'
tlgrm_class.prg(1156) Warning W0001  Ambiguous reference 'CTEXT'
tlgrm_class.prg(1156) Warning W0001  Ambiguous reference 'OERR'
tlgrm_class.prg(1156) Warning W0001  Ambiguous reference 'CTEXT'
tlgrm_class.prg(1157) Warning W0001  Ambiguous reference 'CTEXT'
tlgrm_class.prg(1157) Warning W0001  Ambiguous reference 'CTEXT'
tlgrm_class.prg(1158) Warning W0001  Ambiguous reference 'CTEXT'
tlgrm_class.prg(1158) Warning W0001  Ambiguous reference 'CTEXT'
tlgrm_class.prg(1159) Warning W0001  Ambiguous reference 'CTEXT'
tlgrm_class.prg(1159) Warning W0001  Ambiguous reference 'CTEXT'
tlgrm_class.prg(1161) Warning W0001  Ambiguous reference 'CTEXT'
tlgrm_class.prg(1162) Warning W0001  Ambiguous reference 'CTEXT'
1500
No code generated.
hbmk2[hbtelegram]: Error: Running Harbour compiler (built-in). 1

is possible resolve?
thanks in advance

best regards

Riztan Gutierrez

unread,
Jan 22, 2023, 3:33:44 PM1/22/23
to harbou...@googlegroups.com
Hi, fixed..  thank's



Vikram Chhajer

unread,
Jan 24, 2023, 4:35:37 AM1/24/23
to Harbour Users
HELLO Riztan 

While Compling  Getting this Error



hbmk2: Triggered by #require directive: hbwin.hbc
hbmk2: Triggered by #require directive: hbziparc.hbc
hbmk2: Triggered by #require directive: hbhpdf.hbc
hbmk2: Compiling Harbour sources...
Harbour 3.2.0dev (r1411040054)
Copyright (c) 1999-2014, http://harbour-project.org/

100

100

200

300

400

500

600

700

100

200

300

400

500

600

700

800

900

100

100

200

300
Compiling 'tlgrm_class.prg'...

100

200

300

400

500

c:\hb32\include\tpy_class.ch(18) Error F0029  Can't open #include file 'tpy_xbs.ch'

100

100

200
hbmk2[main]: Error: Running Harbour compiler (embedded). 1
(c:\hb32\bin\harbour.exe) -n2 tlgrm_class.prg -a -m -n -w0 -es0 -b -DHBMK_HAS_HBNF=1 -DHBMK_HAS_HBFORMAT=1 -DHBMK_HAS_HBFOXPRO=1 -DHBMK_HAS_HBCT=1 -DHBMK_HAS_HBTIP=1 -DHBMK_HAS_HBFSHIP=1 -DHBMK_HAS_HBXPP=1 -DHBMK_HAS_HBWIN=1 -DHBMK_HAS_XHB=1 -DHBMK_HAS_MINIZIP=1 -DHBMK_HAS_HBMZIP=1 -DHBMK_HAS_HBZIPARC=1 -DHBMK_HAS_LIBHPDF=1 -DHBMK_HAS_HBHPDF=1 -DHBMK_HAS_HBZEBRA=1 -DHBMK_HAS_HBSSL=1 -o.hbmk\win\mingw\ -ic:\hb32\include -ic:\hb32\contrib\hbnf -ic:\hb32\contrib\hbfoxpro -ic:\hb32\contrib\xhb -ic:\hb32\contrib\hbct -ic:\hb32\contrib\hbtip -ic:\hb32\contrib\hbfship -ic:\hb32\contrib\hbxpp -ic:\hb32\contrib\hbwin -ic:\hb32\contrib\hbmzip -ic:\hb32\contrib\hbhpdf -ic:\hb32\contrib\hbzebra -ic:\hb32\contrib\hbssl -u+c:\hb32\contrib\hbfoxpro\hbfoxpro.ch -u+c:\hb32\contrib\hbwin\hbwin.ch -u+c:\hb32\contrib\hbmzip\hbmzip.ch -u+c:\hb32\contrib\hbhpdf\harupdf.ch -u+c:\hb32\contrib\hbzebra\hbzebra.ch -
u+c:\hb32\contrib\hbssl\hbssl.ch



Where to get this tpy_xbx.ch  Please Help to resolve this issue .

Thanks You
Vikram

Riztan Gutierrez

unread,
Jan 24, 2023, 12:47:09 PM1/24/23
to harbou...@googlegroups.com
Hi Vikram,

From the content of the message, I understand that the "-D __BIN__" instruction in hbtelegram.hbp has not been executed.

In the first lines of tlgrm_class.prg if you want, you can leave only the instructions corresponding to the definition of "__BIN__" and it should compile without problem.

________

Por el contenido del mensaje, entiendo que no se ha ejecutadola instrucción "-D __BIN__" en hbtelegram.hbp

En las primeras lineas de tlgrm_class.prg si quieres, puedes dejar solo las instrucciones correspondientes a la definición de "__BIN__" y ya debe compilar sin problema.



--
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.

Vikram Chhajer

unread,
Jan 24, 2023, 7:12:12 PM1/24/23
to harbou...@googlegroups.com
Hello Ritzan

Can you complete the code because couldn't understand what to do . If possible please update it properly. So this  code will be error free for any one who use this code .

Thank you 

Vikram 

You received this message because you are subscribed to a topic in the Google Groups "Harbour Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/harbour-users/P6vNunHiyXE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to harbour-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/harbour-users/CAJm1d5ZJ4H4EN6s9ScS%2B%2BZ8gv2Er67Z%2B7AS92jg0V_UYSZPJWw%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages