Page 1 of 1

errores en compilacion

PostPosted: Fri Oct 14, 2011 9:04 pm
by agarnati
He instalado la Version 11 y Estoy compilando el ejemplo de la Carpeta makes\bormake\alert.prg
y me da un monton de errores y no se por donde comenzar
Si alguien me puede orientar
Gracias

// FiveWin Clipper Alert replacement

#include "FiveWin.ch"

//-----------------------------------------------------------------//

function Main()

local nOption

nOption = Alert( "take an option",;
{ "&One", "&Two", "T&hree" },;
"Please, select" )

MsgInfo( nOption )

Another() // function located at one.prg

MsgInfo( More() ) // More is located at two.c

return nil

//-----------------------------------------------------------------//

procedure AppSys // XBase++ requirement


return


Utilizo este Build que es muy antiguo y posiblemente este aqui el problema

:BUILD

make -f %1.mak %2 %3 > make.log
if errorlevel 1 goto BUILD_ERR

:BUILD_OK

if exist %1.exe %1.exe
goto EXIT

:BUILD_ERR

notepad make.log
goto EXIT

:EXIT

Alert.mak
#Borland make sample, (c) FiveTech Software 2005-2009

HBDIR=c:\programacion\fw11\harbour
BCDIR=c:\Borland\bcc582
FWDIR=c:\programacion\fw11\fwh

#change these paths as needed
.path.OBJ = .\obj
.path.PRG = .\
.path.CH = $(FWDIR)\include;$(HBDIR)\include
.path.C = .\
.path.rc = .\

#important: Use Uppercase for filenames extensions, in the next two rules!

PRG = \
alert.PRG \
one.PRG

C = \
two.C

PROJECT : Alert.exe

Alert.exe : $(PRG:.PRG=.OBJ) $(C:.C=.OBJ) Alert.res
echo off
echo $(BCDIR)\lib\c0w32.obj + > b32.bc
echo obj\alert.obj obj\one.obj obj\two.obj, + >> b32.bc
echo alert.exe, + >> b32.bc
echo alert.map, + >> b32.bc
echo $(FWDIR)\lib\FiveH.lib $(FWDIR)\lib\FiveHC.lib + >> b32.bc
echo $(HBDIR)\lib\hbrtl.lib + >> b32.bc
echo $(HBDIR)\lib\hbvm.lib + >> b32.bc
echo $(HBDIR)\lib\gtgui.lib + >> b32.bc
echo $(HBDIR)\lib\hblang.lib + >> b32.bc
echo $(HBDIR)\lib\hbmacro.lib + >> b32.bc
echo $(HBDIR)\lib\hbrdd.lib + >> b32.bc
echo $(HBDIR)\lib\rddntx.lib + >> b32.bc
echo $(HBDIR)\lib\rddcdx.lib + >> b32.bc
echo $(HBDIR)\lib\rddfpt.lib + >> b32.bc
echo $(HBDIR)\lib\hbsix.lib + >> b32.bc
echo $(HBDIR)\lib\hbdebug.lib + >> b32.bc
echo $(HBDIR)\lib\hbcommon.lib + >> b32.bc
echo $(HBDIR)\lib\hbpp.lib + >> b32.bc
echo $(HBDIR)\lib\hbwin.lib + >> b32.bc
echo $(HBDIR)\lib\hbcpage.lib + >> b32.bc
echo $(HBDIR)\lib\hbct.lib + >> b32.bc

rem Uncomment these two lines to use Advantage RDD
rem echo $(HBDIR)\lib\rddads.lib + >> b32.bc
rem echo $(HBDIR)\lib\Ace32.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\nddeapi.lib + >> b32.bc
echo $(BCDIR)\lib\psdk\iphlpapi.lib + >> b32.bc
echo $(BCDIR)\lib\psdk\msimg32.lib + >> b32.bc
echo $(BCDIR)\lib\psdk\rasapi32.lib, >> b32.bc

IF EXIST Alert.res echo Alert.res >> b32.bc
$(BCDIR)\bin\ilink32 -Gn -aa -Tpe -s @b32.bc
del b32.bc

.PRG.OBJ:
$(HBDIR)\bin\harbour $< /L /N /W /Oobj\ /I$(FWDIR)\include;$(HBDIR)\include
$(BCDIR)\bin\bcc32 -c -tWM -I$(HBDIR)\include -oobj\$& obj\$&.c

.C.OBJ:
echo -c -tWM -D__HARBOUR__ -DHB_API_MACROS > tmp
echo -I$(HBDIR)\include;$(FWDIR)\include >> tmp
$(BCDIR)\bin\bcc32 -oobj\$& @tmp $&.c
del tmp

Alert.res : Alert.rc
$(BCDIR)\bin\brc32.exe -r Alert.rc

Y me sale la siguiente lista

MAKE Version 5.2 Copyright (c) 1987, 2000 Borland
c:\programacion\fw11\harbour\bin\harbour .\alert.PRG /L /N /W /Oobj\ /Ic:\programacion\fw11\fwh\include;c:\programacion\fw11\harbour\include
c:\Borland\bcc582\bin\bcc32 -c -tWM -Ic:\programacion\fw11\harbour\include -oobj\alert obj\alert.c
Borland C++ 5.82 for Win32 Copyright (c) 1993, 2005 Borland
obj\alert.c:
Error E2209 c:\programacion\fw11\harbour\include\hbdefs.h 56: Unable to open include file 'stdarg.h'
Error E2209 c:\programacion\fw11\harbour\include\hbdefs.h 57: Unable to open include file 'stdio.h'
Error E2209 c:\programacion\fw11\harbour\include\hbdefs.h 58: Unable to open include file 'stdlib.h'
Error E2209 c:\programacion\fw11\harbour\include\hbdefs.h 59: Unable to open include file 'string.h'
Error E2209 c:\programacion\fw11\harbour\include\hbdefs.h 60: Unable to open include file 'limits.h'
Error E2209 c:\programacion\fw11\harbour\include\hbsetup.h 57: Unable to open include file 'limits.h'
Error E2209 c:\programacion\fw11\harbour\include\hbdefs.h 77: Unable to open include file 'stdint.h'
Warning W8017 c:\programacion\fw11\harbour\include\hbdefs.h 574: Redefinition of 'HB_LONG_LENGTH' is not identical
Error E2257 c:\programacion\fw11\harbour\include\hbdefs.h 605: , expected
Error E2141 c:\programacion\fw11\harbour\include\hbdefs.h 1572: Declaration syntax error
Error E2293 c:\programacion\fw11\harbour\include\hbdefs.h 1573: ) expected
Error E2141 c:\programacion\fw11\harbour\include\hbdefs.h 1574: Declaration syntax error
Error E2293 c:\programacion\fw11\harbour\include\hbdefs.h 1575: ) expected
Error E2293 c:\programacion\fw11\harbour\include\hbdefs.h 1576: ) expected
Error E2147 c:\programacion\fw11\harbour\include\hbdefs.h 1577: 'wchar_t' cannot start a parameter declaration
Error E2451 obj\alert.c 23: Undefined symbol 'NULL'
Error E2141 obj\alert.c 23: Declaration syntax error
Error E2190 obj\alert.c 23: Unexpected }
Error E2040 obj\alert.c 23: Declaration terminated incorrectly
Error E2190 obj\alert.c 32: Unexpected }
Error E2109 obj\alert.c 32: Not an allowed type in function hb_vm_SymbolInit_ALERT
*** 20 errors in Compile ***

** error 1 ** deleting .\obj\alert.OBJ

Re: errores en compilacion

PostPosted: Fri Oct 14, 2011 9:21 pm
by Bayron
Intenta a compilar los archivos de la carpeta \samples primero...

Buildh tutor01

o

Buildx tutor01

dependiendo de si usar Harbour o xHarbour... No olvides de colocar las Rutas correctas en el .BAT antes de compilar.....

Re: errores en compilacion

PostPosted: Fri Oct 14, 2011 10:02 pm
by agarnati
Bayron

He compilado los otros prg. y no he tenido problemas, pero con este si.

No obstante gracias por tu respuesta.

Re: errores en compilacion

PostPosted: Sat Oct 15, 2011 8:00 am
by Antonio Linares
Parece que no has definido los ficheros de configuración de Borland.

Hazlo como se explica aqui:
viewtopic.php?f=17&t=13098

Re: errores en compilacion

PostPosted: Sat Oct 15, 2011 10:09 am
by agarnati
Antonio
Tenias razon en el Bcc32.cfg estaba el error yo tenia c:Borland\bcc582\include y al revisarlos me he dado cuenta.

lo he corregido y ahora me da el siguiente

echo c:\Borland\bcc582\lib\psdk\iphlpapi.lib + >> b32.bc
echo c:\Borland\bcc582\lib\psdk\msimg32.lib + >> b32.bc
echo c:\Borland\bcc582\lib\psdk\rasapi32.lib, >> b32.bc
IF EXIST Alert.res echo Alert.res >> b32.bc
c:\Borland\bcc582\bin\ilink32 -Gn -aa -Tpe -s @b32.bc
Turbo Incremental Link 5.69 Copyright (c) 1997-2005 Borland
Error: Unresolved external 'GetModuleFileNameExA' referenced from C:\PROGRAMACION\FW11\FWH\LIB\FIVEH.LIB|GETTASKS

** error 2 ** deleting Alert.exe

Muchas gracias por contestarme Antonio

Saludos

Re: errores en compilacion

PostPosted: Sat Oct 15, 2011 10:36 am
by Antonio Linares
te falta enlazar la libreria psapi.lib de Borland

Re: errores en compilacion

PostPosted: Sat Oct 15, 2011 12:34 pm
by agarnati
Antonio

He hecho lo que me dices como me daba este error he vuelto a instalar el Bcc582 pero nada sigue el mismo error


echo c:\Borland\bcc582\lib\psdk\iphlpapi.lib + >> b32.bc
echo c:\Borland\bcc582\lib\psdk\msimg32.lib + >> b32.bc
echo c:\Borland\bcc582\lib\psdk\rasapi32.lib + >> b32.bc
echo c:\Borland\bcc582\lib\pdsk\psapi.lib, >> b32.bc
IF EXIST Alert.res echo Alert.res >> b32.bc
c:\Borland\bcc582\bin\ilink32 -Gn -aa -Tpe -s @b32.bc
Turbo Incremental Link 5.69 Copyright (c) 1997-2005 Borland
Fatal: Unable to open file 'PSAPI.LIB'

** error 2 ** deleting Alert.exe

Re: errores en compilacion

PostPosted: Sat Oct 15, 2011 12:37 pm
by Antonio Linares
Tienes un pequeño error en esta línea:

echo c:\Borland\bcc582\lib\pdsk\psapi.lib, >> b32.bc

has escrito pdsk en vez de psdk

Re: errores en compilacion

PostPosted: Sat Oct 29, 2011 3:36 pm
by agarnati
Antonio

las prisas traen estos errores.

Lo he corregido y al fin ha funcionado correctamente.

Muchas a gracias por todo Antonio

Saludos