He montado un ejemplo simple que, compilando "como siempre", funciona a las mil maravillas, pero cuando uso hbmk2 falla.
Dejo el ejemplo, el build que uso de toda la vida y mi "traducción" a hbmk2 ... entiendo que algo estoy poniendo mal pero no veo el qué.
¿Alguna ayudita?
Código ejemplo
- Code: Select all Expand view
#include "fivewin.ch"
#include "common.ch"
FUNCTION MAIN( )
LOCAL oUrl
LOCAL oFTP
LOCAL cUser
LOCAL cServer
LOCAL cPassword
cServer := "test.com" //change ftpserver to the real name or ip of your ftp server
cUser := "user" // change ftpuser to an valid user on ftpserer
cPassword := "pass" // change ftppass to an valid password for ftpuser
cUrl := "ftp://" + cUser + ":" + cPassword + "@" + cServer
oUrl := tUrl():New( cUrl )
oFTP := tIPClientFtp():New( oUrl, .T. )
oFTP:nConnTimeout := 20000
oFTP:bUsePasv := .T.
// Comprobamos si el usuario contiene una @ para forzar el userid
IF At( "@", cUser ) > 0
oFTP:oUrl:cServer := cServer
oFTP:oUrl:cUserID := cUser
oFTP:oUrl:cPassword := cPassword
ENDIF
IF oFTP:Open( cUrl )
MSGINFO ('conectado')
ENDIF
RETURN (nil)
Build para compilar que uso siempre
- Code: Select all Expand view
@ECHO OFF
set hdir=c:\SI\NLEN\harbour32
set bcdir=c:\SI\NLEN\bcc70
set fwdir=c:\si\nlen\fwh1906
set hdirl=c:\si\nlen\harbour32\lib
%hdir%\bin\harbour test.prg /i%fwdir%\include;%hdir%\include;%bcdir%\include;c:\si\trabajo\fwh\visionwin20\inc
%bcdir%\bin\bcc32 -M -c -I%hdir%\include;%bcdir%\include %test.c
echo %bcdir%\lib\c0w32.obj + > b32.bc
echo test.obj, +>> b32.bc
echo test.exe, + >> b32.bc
echo test.map, + >> b32.bc
REM ---- Fivewin ----
echo %fwdir%\lib\FiveH.lib + >> b32.bc
echo %fwdir%\lib\FiveHC.lib + >> b32.bc
echo %fwdir%\lib\libcurl.lib + >> b32.bc
REM --- Harbour ----
echo %hdirl%\hbwin.lib + >> b32.bc
echo %hdirl%\gtgui.lib + >> b32.bc
echo %hdirl%\gtwin.lib + >> b32.bc
echo %hdirl%\hbrtl.lib + >> b32.bc
echo %hdirl%\hbvm.lib + >> b32.bc
echo %hdirl%\hblang.lib + >> b32.bc
echo %hdirl%\hbmacro.lib + >> b32.bc
echo %hdirl%\hbrdd.lib + >> b32.bc
echo %hdirl%\rddntx.lib + >> b32.bc
echo %hdirl%\rddcdx.lib + >> b32.bc
echo %hdirl%\rddfpt.lib + >> b32.bc
echo %hdirl%\hbsix.lib + >> b32.bc
echo %hdirl%\hbdebug.lib + >> b32.bc
echo %hdirl%\hbcommon.lib + >> b32.bc
echo %hdirl%\hbpp.lib + >> b32.bc
echo %hdirl%\hbcpage.lib + >> b32.bc
echo %hdirl%\hbcplr.lib + >> b32.bc
echo %hdirl%\hbct.lib + >> b32.bc
echo %hdirl%\hbpcre.lib + >> b32.bc
echo %hdirl%\xhb.lib + >> b32.bc
echo %hdirl%\hbziparc.lib + >> b32.bc
echo %hdirl%\hbmzip.lib + >> b32.bc
echo %hdirl%\hbzlib.lib + >> b32.bc
echo %hdirl%\minizip.lib + >> b32.bc
echo %hdirl%\png.lib + >> b32.bc
echo %hdirl%\hbusrrdd.lib + >> b32.bc
echo %hdirl%\hbmxml.lib + >> b32.bc
echo %hdirl%\hbmisc.lib + >> b32.bc
echo %hdirl%\hbsqlit3.lib + >> b32.bc
echo %hdirl%\hbhttpd.lib + >> b32.bc
echo %hdirl%\hbtip.lib + >> b32.bc
REM --- Borland -----
echo %bcdir%\lib\cw32.lib + >> b32.bc
echo %bcdir%\lib\uuid.lib + >> b32.bc
echo %bcdir%\lib\import32.lib + >> b32.bc
echo %bcdir%\lib\ws2_32.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\psapi.lib + >> b32.bc
echo %bcdir%\lib\psdk\rasapi32.lib + >> b32.bc
echo %bcdir%\lib\psdk\gdiplus.lib + >> b32.bc
echo %bcdir%\lib\psdk\shell32.lib + >> b32.bc
%bcdir%\bin\ilink32 -Gn -aa -Tpe -s @b32.bc
Fichero .hbp que estoy creando :
- Code: Select all Expand view
#
# $Id: test.hbp $
#
#PRG
# ------ MODULO PRINCIPAL -------
test
#INCLUDES
-Ic:\si\nlen\fwh1906\include
#LIBRERIAS FW
-Lc:\si\nlen\fwh1906\lib
-lFiveH
-lFiveHC
#LIBRERIAS HARBOUR
-lhbwin
-lgtgui
-llibhpdf
-lhbhpdf
-lhbct
-lxhb
-lhbziparc
-lhbmzip
-lminizip
-lpng
-lhbcomm
-lhbtip
-lhbmxml
-lmxml
#LIBRERIAS BORLAND
-Lc:\si\nlen\Bcc70\lib
-lcw32
-luuid
-limport32
-lws2_32
-Lc:\si\nlen\bcc70\lib\psdk
-lodbc32
-lnddeapi
-liphlpapi
-lmsimg32
-lpsapi
-lrasapi32
-lgdiplus
-lshell32
El error que arroja :
Gracias!