xHARBOUR en modo consola (solucionado)

xHARBOUR en modo consola (solucionado)

Postby Patricio Avalos Aguirre » Wed Feb 20, 2013 4:07 am

Estimados

alguien que use xharbour en modo consola me pueda enviar los archivos de linkeo
ya que no he podido hacerlo andar

si es posible que pueda ejecuar este simple ejemplo

function main()
alert( "Hola" )
return nil


desde ya gracias
Last edited by Patricio Avalos Aguirre on Fri Feb 22, 2013 7:47 am, edited 1 time in total.
Saludos
Patricio

__________________________________________________________________
Version: Harbour 3.2.0dev (r1307082134),Compiler: Borland C++ 5.8.2 (32-bit)
PCode version: 0.3, FWH 13.2
http://www.sialm.cl
User avatar
Patricio Avalos Aguirre
 
Posts: 1060
Joined: Fri Oct 07, 2005 1:56 pm
Location: La Serena, Chile

Re: xHARBOUR en modo consola

Postby Patricio Avalos Aguirre » Wed Feb 20, 2013 5:21 am

estimaods, dejo aqui lo que tengo hecho para ver si alguien lo puede echar una manito y dejarlo funcionando, compila bien pero no hace nada :-(

modulo1.prg
ANNOUNCE RDDSYS
function main()
cls
alert( "consola" )
@ 10,10 say "Hola"
inkey(0)
return nil
//---------------------------------------
procedure RddInit()
REQUEST HB_LANG_ES
REQUEST DBFCDX, DBFFPT
return
//---------------------------------------


do.bat
@ECHO OFF
CLS

if A%1 == A GOTO :SINTAX
if NOT EXIST %1.prg GOTO :NOEXIST

ECHO Compiling...

set hdir=c:\xharbour
set bcdir=c:\borland\bcc582
%hdir%\bin\harbour %1 /n /a /i..\include;%hdir%\include;c: /p %2 %3 > clip.log
@type clip.log
IF ERRORLEVEL 1 PAUSE
IF ERRORLEVEL 1 GOTO EXIT

echo -O2 -e%1.exe -I%hdir%\include %1.c > b32.bc
%bcdir%\BIN\bcc32 -M -c @b32.bc
:ENDCOMPILE

echo %bcdir%\lib\c0w32.obj + > b32.bc
echo %1.obj, + >> b32.bc
echo %1.exe, + >> b32.bc
echo %1.map, + >> b32.bc
echo %hdir%\lib\rtl.lib + >> b32.bc
echo %hdir%\lib\vm.lib + >> b32.bc
echo %hdir%\lib\gtgui.lib + >> b32.bc
echo %hdir%\lib\lang.lib + >> b32.bc
echo %hdir%\lib\macro.lib + >> b32.bc
echo %hdir%\lib\rdd.lib + >> b32.bc
echo %hdir%\lib\dbfntx.lib + >> b32.bc
echo %hdir%\lib\dbfcdx.lib + >> b32.bc
echo %hdir%\lib\dbffpt.lib + >> b32.bc

echo %hdir%\lib\debug.lib + >> b32.bc
echo %hdir%\lib\common.lib + >> b32.bc
echo %hdir%\lib\pp.lib + >> b32.bc

rem Uncomment these two lines to use Advantage RDD
rem echo %hdir%\lib\rddads.lib + >> b32.bc
rem echo %hdir%\lib\ace32.lib + >> b32.bc

echo %bcdir%\lib\cw32.lib + >> b32.bc
echo %hdir%\lib\hbsix.lib + >> b32.bc
echo %hdir%\lib\pcrepos.lib + >> b32.bc
echo %bcdir%\lib\import32.lib, >> b32.bc
ECHO *
ECHO Linking...
%bcdir%\BIN\ilink32 -Gn -Tpe -s @b32.bc

rem delete temporary files
rem @del %1.c

IF ERRORLEVEL 1 GOTO LINKERROR
ECHO * Application successfully built
%1
GOTO EXIT
ECHO

:LINKERROR
rem PAUSE * Linking errors *
GOTO EXIT

:SINTAX
ECHO SYNTAX: Build [Program] {-- No especifiques la extensi¢n PRG
ECHO {-- Don't specify .PRG extension
GOTO EXIT

:NOEXIST
ECHO The specified PRG %1 does not exist

:EXIT

Code: Select all  Expand view  RUN
EJECUTAR DO MODULO1



INFO DE XHARBOUR
Code: Select all  Expand view  RUN
Harbour Build Info
---------------------------
Version: xHarbour build 1.2.1 Intl. (SimpLex) (Rev. 9656)
PCode Version: 10
Compiler: Borland C++ 5.8.2 (32 bit)
Platform: Windows XP Professional 5.01.2600 Service Pack 3
Saludos
Patricio

__________________________________________________________________
Version: Harbour 3.2.0dev (r1307082134),Compiler: Borland C++ 5.8.2 (32-bit)
PCode version: 0.3, FWH 13.2
http://www.sialm.cl
User avatar
Patricio Avalos Aguirre
 
Posts: 1060
Joined: Fri Oct 07, 2005 1:56 pm
Location: La Serena, Chile

Re: xHARBOUR en modo consola

Postby karinha » Wed Feb 20, 2013 12:38 pm

@Echo Off

SET CLIPPER=
SET LIB=
SET INCLUDE=
REM path=%path%;c:\bcc55
set include=c:\bcc55\include

Cls
Echo ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
Echo ³ FiveWin for xHarbour 2.3 - January 2002 xHarbour development power ³Ü
Echo ³ (c) FiveTech, 1993-2002 for Microsoft Windows 95/98/NT/2000/ME and XP ³Û
Echo ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÛ
Echo ÿ ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

SET CLIPPER=
Set hdir=C:\xHarbour
Set bcdir=C:\BCC55

@If Exist HELLO.Exe Del HELLO.EXE
@If Exist HELLO.OBJ Del HELLO.OBJ
@If Exist HELLO.C Del HELLO.C
@If Exist HELLO.MAP Del HELLO.MAP

%hdir%\bin\harbour HELLO /M /N /i%hdir%\include /W0 /P HELLO.C > CLIP.LOG

REM @If "HELLO" == "" Goto Linka
REM :Linka
REM If ErrorLevel 1 Type Erro.
REM &&| More
REM If ErrorLevel 1 Pause
REM If ErrorLevel 1 Goto Exit

echo -O2 -eHELLO.exe -I%hdir%\include HELLO.c > b32.bc

%bcdir%\bin\bcc32 -M -c -v @b32.bc

:ENDCOMPILE

echo \BCC55\lib\c0w32.obj + > b32.bc
echo HELLO.obj, + >> b32.bc
echo HELLO.exe, + >> b32.bc
echo HELLO.map, + >> b32.bc
echo %hdir%\lib\rtl.lib + >> b32.bc
echo %hdir%\lib\vm.lib + >> b32.bc
echo %hdir%\lib\gtwin.lib + >> b32.bc
echo %hdir%\lib\lang.lib + >> b32.bc
echo %hdir%\lib\macro.lib + >> b32.bc
echo %hdir%\lib\rdd.lib + >> b32.bc
echo %hdir%\lib\dbfntx.lib + >> b32.bc
echo %hdir%\lib\dbfcdx.lib + >> b32.bc
echo %hdir%\lib\dbffpt.lib + >> b32.bc
echo %hdir%\lib\hbsix.lib + >> b32.bc
echo %hdir%\lib\hbzip.lib + >> b32.bc
echo %hdir%\lib\debug.lib + >> b32.bc
echo %hdir%\lib\common.lib + >> b32.bc
echo %hdir%\lib\pp.lib + >> b32.bc
echo %hdir%\lib\codepage.lib + >> b32.bc
echo %bcdir%\lib\cw32.lib + >> b32.bc
echo %bcdir%\lib\import32.lib + >> b32.bc
echo %bcdir%\lib\psdk\odbc32.lib + >> b32.bc
echo %bcdir%\lib\psdk\rasapi32.lib + >> b32.bc
echo %bcdir%\lib\psdk\nddeapi.lib + >> b32.bc
echo %bcdir%\lib\psdk\iphlpapi.lib >> b32.bc

rem %bcdir%\bin\ilink32 -Gn -Tpe -s -v @b32.bc

%bcdir%\bin\ilink32 -Gn -Tpe -s -v @b32.bc

IF ERRORLEVEL 1 GOTO LINKERROR
Echo * Application successfully built
rem HELLO
REM UPX -9 HELLO.EXE
Goto Exit
Echo

:LINKERROR
rem if exist meminfo.txt notepad meminfo.txt
Pause * Linking errors *
Goto Exit

:Exit

João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7831
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: xHARBOUR en modo consola

Postby Patricio Avalos Aguirre » Wed Feb 20, 2013 1:39 pm

Gracias karinha por responder, pero no funciono, compila bien pero no hace nada, se quea en negro parpadeando el cursor

faltara algun tipo de parametro al xharbour o ya no es modo consola?

tengo esta version de xharbour, a lo mejor con una version menor puede que funcione
c:\xharbour\bin\harbour /build |more
Harbour Build Info
---------------------------
Version: xHarbour build 1.2.1 Intl. (SimpLex) (Rev. 9656)
PCode Version: 10
Compiler: Borland C++ 5.8.2 (32 bit)
Platform: Windows XP Professional 5.01.2600 Service Pack 3
Saludos
Patricio

__________________________________________________________________
Version: Harbour 3.2.0dev (r1307082134),Compiler: Borland C++ 5.8.2 (32-bit)
PCode version: 0.3, FWH 13.2
http://www.sialm.cl
User avatar
Patricio Avalos Aguirre
 
Posts: 1060
Joined: Fri Oct 07, 2005 1:56 pm
Location: La Serena, Chile

Re: xHARBOUR en modo consola

Postby karinha » Wed Feb 20, 2013 1:48 pm

Como están los .CFG de su compilador borland??

En últino caso formate tu computadora, puede ser esto.

aca, funciona bién.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7831
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: xHARBOUR en modo consola

Postby Antonio Linares » Wed Feb 20, 2013 2:22 pm

Patricio,

Creo que puede ser el flag -aa que te falta aqui:

%bcdir%\BIN\ilink32 -Gn -Tpe -aa -s @b32.bc

ó tal vez sea -ap en vez de -aa
http://www2.pmf.fh-goettingen.de/~isimon/Informatik/CompilerHowto/ilinkSchalter.htm
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42117
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: xHARBOUR en modo consola

Postby karinha » Wed Feb 20, 2013 2:46 pm

%bcdir%\BIN\ilink32 -Gn -Tpe -aa -s @b32.bc

Maestro Antonio haciendo asi, con mi compilador BCC55 genera el .EXE mas no ejecuta.

salu2.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7831
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: xHARBOUR en modo consola

Postby karinha » Wed Feb 20, 2013 2:49 pm

@Echo Off

SET CLIPPER=
SET LIB=
SET INCLUDE=
REM path=%path%;c:\bcc55
set include=c:\bcc55\include

Cls
Echo ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
Echo ³ FiveWin for xHarbour 2.3 - January 2002 xHarbour development power ³Ü
Echo ³ (c) FiveTech, 1993-2002 for Microsoft Windows 95/98/NT/2000/ME and XP ³Û
Echo ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÛ
Echo ÿ ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

SET CLIPPER=
Set hdir=C:\xHarbour
Set bcdir=C:\BCC55

@If Exist HELLO.Exe Del HELLO.EXE
@If Exist HELLO.OBJ Del HELLO.OBJ
@If Exist HELLO.C Del HELLO.C
@If Exist HELLO.MAP Del HELLO.MAP

%hdir%\bin\harbour HELLO /M /N /i%hdir%\include /W0 /P HELLO.C > CLIP.LOG

REM @If "HELLO" == "" Goto Linka
REM :Linka
REM If ErrorLevel 1 Type Erro.
REM &&| More
REM If ErrorLevel 1 Pause
REM If ErrorLevel 1 Goto Exit

echo -O2 -eHELLO.exe -I%hdir%\include HELLO.c > b32.bc

%bcdir%\bin\bcc32 -M -c -v @b32.bc

:ENDCOMPILE

echo \BCC55\lib\c0w32.obj + > b32.bc
echo HELLO.obj, + >> b32.bc
echo HELLO.exe, + >> b32.bc
echo HELLO.map, + >> b32.bc
echo %hdir%\lib\rtl.lib + >> b32.bc
echo %hdir%\lib\vm.lib + >> b32.bc
echo %hdir%\lib\gtwin.lib + >> b32.bc
echo %hdir%\lib\lang.lib + >> b32.bc
echo %hdir%\lib\macro.lib + >> b32.bc
echo %hdir%\lib\rdd.lib + >> b32.bc
echo %hdir%\lib\dbfntx.lib + >> b32.bc
echo %hdir%\lib\dbfcdx.lib + >> b32.bc
echo %hdir%\lib\dbffpt.lib + >> b32.bc
echo %hdir%\lib\hbsix.lib + >> b32.bc
echo %hdir%\lib\hbzip.lib + >> b32.bc
echo %hdir%\lib\debug.lib + >> b32.bc
echo %hdir%\lib\common.lib + >> b32.bc
echo %hdir%\lib\pp.lib + >> b32.bc
echo %hdir%\lib\codepage.lib + >> b32.bc
echo %bcdir%\lib\cw32.lib + >> b32.bc
echo %bcdir%\lib\import32.lib + >> b32.bc
echo %bcdir%\lib\psdk\odbc32.lib + >> b32.bc
echo %bcdir%\lib\psdk\rasapi32.lib + >> b32.bc
echo %bcdir%\lib\psdk\nddeapi.lib + >> b32.bc
echo %bcdir%\lib\psdk\iphlpapi.lib >> b32.bc

REM %bcdir%\bin\ilink32 -Gn -Tpe -s -v @b32.bc // asi funciona bien

rem %bcdir%\BIN\ilink32 -Gn -Tpe -aa -s @b32.bc // no funciona

%bcdir%\BIN\ilink32 -Gn -Tpe -ap -s @b32.bc // Asi funciona bien

IF ERRORLEVEL 1 GOTO LINKERROR
Echo * Application successfully built
rem HELLO
REM UPX -9 HELLO.EXE
Goto Exit
Echo

:LINKERROR
rem if exist meminfo.txt notepad meminfo.txt
Pause * Linking errors *
Goto Exit

:Exit

João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7831
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: xHARBOUR en modo consola

Postby Patricio Avalos Aguirre » Wed Feb 20, 2013 3:00 pm

Gracias por responder, pero ya lo solucione cambiandome a harbour dejo el xharbour..

C:\harbour\bin>harbour /build |more
Harbour Build Info
---------------------------
Version: Harbour 3.1.0dev (Rev. 17025)
Compiler: Borland C++ 5.8.2 (32-bit)
Platform: Windows XP 5.1.2600 Service Pack 3
PCode version: 0.3
ChangeLog last entry: 2011-08-30 12:30 UTC+0200 Przemyslaw Czerpak (druzus/at/pr
iv.onet.pl)
ChangeLog ID: ChangeLog 17025 2011-08-30 10:30:47Z druzus
Built on: Aug 31 2011 13:19:44
Build options: (Clipper 5.3b) (Clipper 5.x undoc)
---------------------------
Harbour 3.1.0dev (Rev. 17025)
Copyright (c) 1999-2011, http://harbour-project.org/
Saludos
Patricio

__________________________________________________________________
Version: Harbour 3.2.0dev (r1307082134),Compiler: Borland C++ 5.8.2 (32-bit)
PCode version: 0.3, FWH 13.2
http://www.sialm.cl
User avatar
Patricio Avalos Aguirre
 
Posts: 1060
Joined: Fri Oct 07, 2005 1:56 pm
Location: La Serena, Chile

Re: xHARBOUR en modo consola

Postby Antonio Linares » Wed Feb 20, 2013 4:03 pm

Para Harbour en modo consola puedes usar FWH/samples/build.bat (sin la 'h')
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42117
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 85 guests