Compilar en consola

Post Reply
User avatar
Patricio Avalos Aguirre
Posts: 1028
Joined: Fri Oct 07, 2005 1:56 pm
Location: La Serena, Chile
Contact:

Compilar en consola

Post by Patricio Avalos Aguirre »

Estimado,

Quiero compilar en modo consola, pero el ejecutable se queda en memoria sin hacer nada, algo debo estar haciendo mal, a ver si me echan una ayudita

este es el ADS.PRG

Code: Select all

Procedure Main()
	local i

	alert( "mm2" )

	FIELD CAMPO1, CAMPO2

	dbCreate( "PASO", {{ "campo1", "C", 10, 0 },;
							 { "campo2", "C", 10, 0 }} )

	SELE 0 ; USE "PASO" NEW EXCLUSIVE

	for i := 1 to 10
		dbAppend()
		Field->Campo1 := PadL( i, 10, "0" )
		Field->Campo2 := str(i, 10 )
	Next i

	dbCloseAll()

return

este es el BAT de compilacion

Code: Select all

@echo off
CLS
ECHO Compiling PRG

set hdir=c:\harbour
set bcdir=c:\borland\bcc55\bin
set include=c:\harbour\include

%hdir%\bin\harbour ads.prg /a /n >clip.log
@type clip.log
IF ERRORLEVEL 1 PAUSE
IF ERRORLEVEL 1 GOTO EXIT

echo -O2 -e%1.exe -I%hdir%\include -tW %1.c > b32.bc
%bcdir%\bcc32 -OS -5 -tW -M @b32.bc

:ENDCOMPILE

IF EXIST %1.rc %bcdir%\brc32 -r %1

echo c0w32.obj + > b32.bc
echo ADS.obj, + >> b32.bc
echo ADS.exe, + >> b32.bc
echo ADS.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\hbsix.lib  + >> b32.bc
echo %hdir%\lib\common.lib + >> b32.bc
echo %hdir%\lib\pp.lib + >> b32.bc
rem echo %hdir%\lib\rddads.lib + >> b32.bc
rem echo %hdir%\lib\Ace32.lib + >> b32.bc
echo %hdir%\lib\pcrepos.lib + >> b32.bc
echo c:\borland\bcc55\lib\cw32.lib + >> b32.bc
echo c:\borland\bcc55\lib\import32.lib, >> b32.bc

cls
%bcdir%\ilink32 -aa -Tpe @b32.bc
pause

:EXIT
se agradece la ayuda..

Feliz Año 2008 a tod@s
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
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Patricio,

Para modo consola tienes que usar gtstd.lib en vez de gtgui.lib
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply