Haru free pdf library linking help (unresolve external)...

Haru free pdf library linking help (unresolve external)...

Postby bosibila » Wed Oct 12, 2011 4:05 pm

Hello everybody,

I have trouble with linking Haru free pdf library in new version of FWH.

Before one month I migrate from 8.07 to 11.08. My code with Haru from v8.07 did not work with new version. I tray to find links to connect "unresolve external" with "_hb_storclen_buffer" or "_hb_set" but without results.

Does someone work with Haru and new version FWH, to send me a batch "buildx.bat" to link my harupdfo.prg example?

HaruPdfo.prg:
Code: Select all  Expand view
//----------------------------------------------------------------------//
#include "fivewin.ch"
#include "harupdf.ch"
//----------------------------------------------------------------------//

Function Main( cFileToSave )

   if empty( cFileToSave )
      cFileToSave := "myharu3.pdf"
      erase myharu3.pdf
   endif

   if DesignHaruPDF( cFileToSave )
      Alert( "PDF File <"+cFileToSave+"> is Created!" )
   else
      Alert( "Some problems in creating the PDF!" )
   endif

   Return nil

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

Function DesignHaruPDF( cFileToSave )
   Local i, page, height, width, def_font, tw,  samp_text, font, font_normal, font_bold
   Local pdf := HPDF_New(), font_name, ii:=1

   if pdf == NIL
      alert( " Pdf could not been created!" )
      return nil
   endif


   HPDF_SetCompressionMode( pdf, HPDF_COMP_ALL )
   page := HPDF_AddPage(pdf)
   height := HPDF_Page_GetHeight(page)
   width  := HPDF_Page_GetWidth(page)

   samp_text := " - ŠĐČĆŽšđčćž abcdefgABCDEFG12345!#$%&+-@?"

   HPDF_Page_BeginText( page )
   HPDF_Page_MoveTextPos( page, 35, height - 20 )

   for i := 1 to 65
       *--------------------------------------------------
       HPDF_Page_ShowText( page, strzero(ii++,9)+" "+replicate("123456789 ",7) )
       HPDF_Page_MoveTextPos( page, 0, -12.5 )  
       *--------------------------------------------------
   next
   HPDF_Page_EndText( page )

   HPDF_SaveToFile( pdf, cFileToSave )
   HPDF_Free( pdf )

Return file( cFileToSave )

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

 


My buildx.bat:
Code: Select all  Expand view
@ECHO OFF
CLS
ECHO ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄż
ECHO ł FiveWin for xHarbour 11.08 - Aug. 2011          xHarbour development power łÜ
ECHO ł (c) FiveTech, 1993-2011     for Microsoft Windows 9X/NT/200X/ME/XP/Vista/7 łŰ
ECHO ŔÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄŮŰ
ECHO ˙ ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

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

ECHO Compiling...

if "%FWDIR%" == "" set FWDIR=d:\fwh
rem .\..\
if "%XHDIR%" == "" set XHDIR=d:\xharbour
rem if "%2" == "/b" set GT=gtwin
rem if not "%2" == "/b" set GT=gtgui
set GT=gtgui

set hdir=%XHDIR%
set hdirl=%hdir%\lib
set bcdir=d:\bcc582
set fwh=%FWDIR%

%hdir%\bin\harbour %1 /n /i%fwh%\include;%hdir%\include /w /p %2 %3 > comp.log
IF ERRORLEVEL 1 GOTO COMPILEERRORS
@type comp.log

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

IF EXIST %1.rc %bcdir%\bin\brc32 -r -I%bcdir%\include %1

echo %bcdir%\lib\c0w32.obj + > b32.bc
echo %1.obj, + >> b32.bc
echo %1.exe, + >> b32.bc
echo %1.map, + >> b32.bc
echo %fwh%\lib\Fivehx.lib %fwh%\lib\FiveHC.lib + >> b32.bc
echo %hdirl%\rtl.lib + >> b32.bc
echo %hdirl%\vm.lib + >> b32.bc
echo %hdirl%\%GT%.lib + >> b32.bc
echo %hdirl%\lang.lib + >> b32.bc
echo %hdirl%\macro.lib + >> b32.bc
echo %hdirl%\rdd.lib + >> b32.bc
echo %hdirl%\dbfntx.lib + >> b32.bc
echo %hdirl%\dbfcdx.lib + >> b32.bc
echo %hdirl%\dbffpt.lib + >> b32.bc
echo %hdirl%\hbsix.lib + >> b32.bc
echo %hdirl%\debug.lib + >> b32.bc
echo %hdirl%\common.lib + >> b32.bc
echo %hdirl%\pp.lib + >> b32.bc
echo %hdirl%\pcrepos.lib + >> b32.bc
echo %hdirl%\ct.lib + >> b32.bc
echo %hdirl%\zlib.lib + >> b32.bc
echo %hdirl%\hbzip.lib + >> b32.bc

echo %hdirl%\hbvm.lib + >> b32.bc
echo %hdirl%\hbcommon.lib + >> b32.bc

echo %hdirl%\libhpdf.lib + >> b32.bc
echo %hdirl%\hbhpdf.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 %bcdir%\lib\import32.lib + >> b32.bc
echo %bcdir%\lib\uuid.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\msimg32.lib + >> b32.bc
echo %bcdir%\lib\psdk\psapi.lib + >> b32.bc
echo %bcdir%\lib\psdk\iphlpapi.lib, >> b32.bc

IF EXIST %1.res echo %1.res >> b32.bc

rem uncomment this line to use the debugger and comment the following one
if %GT% == gtwin %bcdir%\bin\ilink32 -Gn -Tpe -s -v @b32.bc
IF ERRORLEVEL 1 GOTO LINKERROR
if %GT% == gtgui %bcdir%\bin\ilink32 -Gn -aa -Tpe -s -v @b32.bc
IF ERRORLEVEL 1 GOTO LINKERROR
ECHO * Application successfully built *
%1
GOTO EXIT
ECHO

rem delete temporary files
@del %1.c

:COMPILEERRORS
@type comp.log
ECHO * Compile errors *
GOTO EXIT

:LINKERROR
ECHO * 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


Thanks in advance.

Best regards
Boris (FWH 20.07, xHarbour 1.2.3, Harbour 3.2.0, BCC74, MySql 5.7)
User avatar
bosibila
 
Posts: 53
Joined: Wed Aug 06, 2008 5:27 pm
Location: Osijek, Croatia

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 112 guests