Compilando HolaMundo - Compiling HelloWorld

250 views
Skip to first unread message

Javier ArgentinaBBAR

unread,
Aug 6, 2020, 6:31:56 PM8/6/20
to harbou...@googlegroups.com
Buenas tardes.
Soy muy nuevo en Harbour, pero muy viejo en Clipper 5.x y Linux.
Estoy queriendo compilar un programa básico.
Funciona bien bajo Windows, pero me estoy rompiendo la cabeza en linux.

El programa es el básico:
===========
PROCEDURE Main()
? "¡Hola, mundo!"
RETURN
===========

El cual me da esta serie de errores, como si el programa en C++
estuviese mal definido. Lo cual es imposible, pues lo arma Harbour.
Si alguien me puede guiar.
Mis instrucciones de compilación son:

$ harbour hm.prg -n -q0 -es2 -gc0 -I/usr/include/harbour

$ gcc hm.c -L/usr/lib/harbour -I/usr/include/harbour
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/Scrt1.o:
en la función `_start':
(.text+0x20): referencia a `main' sin definir
/usr/bin/ld: /tmp/ccCczdUd.o: en la función `hb_vm_SymbolInit_HM':
hm.c:(.text+0x23): referencia a `hb_vmProcessSymbols' sin definir
/usr/bin/ld: /tmp/ccCczdUd.o: en la función `HB_FUN_MAIN':
hm.c:(.text+0x47): referencia a `hb_vmExecute' sin definir
/usr/bin/ld: /tmp/ccCczdUd.o:(.data.rel+0x30): referencia a
`HB_FUN_QOUT' sin definir
collect2: error: ld returned 1 exit status

Gracias
JAP

=========================================================================

Good afternoon.
I am very new to Harbor, but very old to Clipper 5.x and Linux.
I want to compile a basic program.
It works fine under Windows, but I'm breaking my head on linux.

The program is basic:
===========
PROCEDURE Main()
? "Hello World!"
RETURN
===========

Which gives me this series of errors, as if the C ++ program was
poorly defined. Which is impossible, because it is built by Harbor.
If anyone can guide me.
My build instructions are:

$ harbor hm.prg -n -q0 -es2 -gc0 -I / usr / include / harbor

$ gcc hm.c -L / usr / lib / harbor -I / usr / include / harbor
/ usr / bin / ld:
/usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/Scrt1.o: in
the `_start 'function:
(.text + 0x20): reference to undefined `main '
/ usr / bin / ld: /tmp/ccCczdUd.o: in the `hb_vm_SymbolInit_HM 'function:
hm.c :(. text + 0x23): reference to `hb_vmProcessSymbols' undefined
/ usr / bin / ld: /tmp/ccCczdUd.o: in the `HB_FUN_MAIN 'function:
hm.c :(. text + 0x47): reference to `hb_vmExecute 'undefined
/ usr / bin / ld: /tmp/ccCczdUd.o:(.data.rel+0x30): reference to
undefined `HB_FUN_QOUT '
collect2: error: ld returned 1 exit status

Thanks
JAP

Itamar Lins

unread,
Aug 6, 2020, 6:46:41 PM8/6/20
to Harbour Users
Hi!
use hbmk2
~$hbmk2 hm.prg
or
~$hbrun hm.prg

Best regards,
Itamar M. Lins Jr.

Appliserver

unread,
Aug 6, 2020, 6:47:25 PM8/6/20
to harbou...@googlegroups.com
hbmk2 hm

Dan

unet corp.

unread,
Aug 11, 2020, 2:45:50 AM8/11/20
to harbou...@googlegroups.com
You need use for compile the command hbmk2


From: harbou...@googlegroups.com <harbou...@googlegroups.com> on behalf of Javier ArgentinaBBAR <javier.de...@gmail.com>
Sent: Friday, August 7, 2020 12:31:41 AM
To: harbou...@googlegroups.com <harbou...@googlegroups.com>
Subject: [harbour-users] Compilando HolaMundo - Compiling HelloWorld
 
--
--
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/CAG0od5fWRjqy26mkChqHpt4twKAtzL04hN995OMs3fXnX%3DAaCg%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages