SAMPSIX.PRG (in samples folder)

Post Reply
HunterEC
Posts: 723
Joined: Tue Sep 04, 2007 8:45 am

SAMPSIX.PRG (in samples folder)

Post by HunterEC »

Guys:

Compiling the SAMPSIX from the samples folder, either with the BUILD.BAT or BUILDX.BAT leads to the following linker errors:

Code: Select all

Borland C++ 5.82 for Win32 Copyright (c) 1993, 2005 Borland
SAMPSIX.c:
Turbo Incremental Link 5.69 Copyright (c) 1997-2005 Borland
Error: Unresolved external '_HB_FUN_SIX' referenced from C:\SAMPSIX.OBJ
Error: Unresolved external '_HB_FUN_SX_SETFILETYPE' referenced from C:\SAMPSIX.OBJ
Error: Unresolved external '_HB_FUN_SX_SETCENTURY' referenced from C:\SAMPSIX.OBJ
Error: Unresolved external '_HB_FUN_SX_SETDELETED' referenced from C:\SAMPSIX.OBJ
Error: Unresolved external '_HB_FUN_SX_SETEPOCH' referenced from C:\SAMPSIX.OBJ
* Linking errors *
Here's the PPO file:

Code: Select all

#line 203 "e:\comp\HarbourB\include\hbclass.ch"
DECLARE HBClass  New( cName AS STRING, OPTIONAL SuperParams ) AS CLASS HBClass  Create() AS OBJECT  Instance() AS OBJECT  AddClsMethod( cName AS STRING, @MethodName(), nScope AS NUMERIC, n2 AS NUMERIC, n3 AS NUMERIC )  AddMultiClsData( cType AS STRING, uVal, nScope AS NUMERIC, aDatas AS ARRAY OF STRING )  AddMultiData( cType AS STRING, uVal, nScope AS NUMERIC, aDatas AS ARRAY OF STRING, x AS LOGICAL, lPer AS LOGICAL )  AddMethod( cName AS STRING, @MethodName(), nScope AS NUMERIC )  AddInLine( cName AS STRING, bBlock AS CODEBLOCK, nScope AS NUMERIC )  AddVirtual( cName AS STRING )
#line 99 "e:\comp\fwh\include\FiveWin.ch"
         EXTERNAL FW_GT











extern errorsys
#line 14 "SAMPSIX.prg"
PROCEDURE Main
    LOCAL cPassWord := "12345678"

    EXTERNAL SIX
    rddRegister( "SIX", 1 )
    rddsetdefault( "SIX" )
    sx_SetFileType( if( upper( "CDX" ) == "NTX", 1, if( upper( "CDX" ) == "CDX", 2, 3 ) ) )
    ThreadSleep(100)

    SETCANCEL(.F.)

    __SetCentury( "ON" ) ; sx_SetCentury( "ON" )
    Set( 27, "OFF" )
    Set( 11, "ON" ) ; sx_SetDeleted( if( upper( "ON" ) == "ON", .T., .F. ) )
    Set( 5, 2000 ) ; sx_SetEpoch( 2000 )
    Set( 28, "ON" )
    Set( 35, "ON" )

    sx_SetTrigger( 5, ) ; dbUseArea( .T., "SIX", "Customer",, if(.T. .OR. .F., !.F., NIL), .F. )
    Sx_SetPass(cPassWord)
    Sx_DBFencrypt()


    dbCloseArea()
RETURN
 

Any ideas as of what is missing ?

Thank you.
Last edited by HunterEC on Tue Feb 18, 2014 3:12 pm, edited 1 time in total.
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: SAMPSIX.PRG (in samples folder)

Post by Enrico Maria Giordano »

HunterEC wrote:Guys:

Compiling the SAMPSIX from the samples folder, either with the BUILD.BAT or BUILDX.BAT leads to the following linker errors:

Code: Select all

Borland C++ 5.82 for Win32 Copyright (c) 1993, 2005 Borland
SAMPSIX.c:
Turbo Incremental Link 5.69 Copyright (c) 1997-2005 Borland
Error: Unresolved external '_HB_FUN_SIX' referenced from C:\SAMPSIX.OBJ
Error: Unresolved external '_HB_FUN_SX_SETFILETYPE' referenced from C:\SAMPSIX.OBJ
Error: Unresolved external '_HB_FUN_SX_SETCENTURY' referenced from C:\SAMPSIX.OBJ
Error: Unresolved external '_HB_FUN_SX_SETDELETED' referenced from C:\SAMPSIX.OBJ
Error: Unresolved external '_HB_FUN_SX_SETEPOCH' referenced from C:\SAMPSIX.OBJ
* Linking errors *
Any ideas as of what is missing ?

Thank you.
I can't find sampsix.prg neither any references to the above functions in *.prg, *.c or *.lib.

:?:

EMG
User avatar
karinha
Posts: 4882
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: SAMPSIX.PRG (in samples folder)

Post by karinha »

João Santos - São Paulo - Brasil
HunterEC
Posts: 723
Joined: Tue Sep 04, 2007 8:45 am

Re: SAMPSIX.PRG (in samples folder)

Post by HunterEC »

Guys:

Even installing the xHarbour version contained in the thread I still got the following linker errors (same with FW 13.09 & FW 13.12):

Code: Select all

Turbo Incremental Link 5.69 Copyright (c) 1997-2005 Borland
Error: Unresolved external '_HB_FUN_SX_SETFILETYPE' referenced from C:\SAMPSIX.OBJ
Error: Unresolved external '_HB_FUN_SX_SETCENTURY' referenced from C:\SAMPSIX.OBJ
Error: Unresolved external '_HB_FUN_SX_SETDELETED' referenced from C:\SAMPSIX.OBJ
Error: Unresolved external '_HB_FUN_SX_SETEPOCH' referenced from C:\SAMPSIX.OBJ
Error: Unresolved external '_HB_FUN_FW_GT' referenced from C:\SAMPSIX.OBJ
Error: Unresolved external '_HB_FUN_SIX' referenced from C:\SAMPSIX.OBJ
* Linking errors *
Here's the source code (as installed with FW 13.09):

Code: Select all

#define DRIVER    "SIX"

#include "Apollo.ch"

#include "FiveWin.ch"
#include "Inkey.ch"


#xtranslate Sx_I_TagName()    => ORDNAME(ORDSETFOCUS())
#xtranslate Sx_I_IndexName()  => ORDBAGNAME()
#xtranslate Sx_KeysIncluded() => ORDKEYCOUNT()


PROCEDURE Main
    LOCAL cPassWord := "12345678"

    request SIX
    rddRegister( "SIX", 1 )
    rddsetdefault( "SIX" )
    SET FILETYPE TO CDX
    ThreadSleep(100)

    SETCANCEL(.F.)
    SET _3DLOOK ON
    SET CENTURY ON
    SET CONFIRM OFF
    SET DELETED ON
    SET EPOCH TO 2000
    SET ESCAPE ON
    SET WRAP ON

    USE Customer NEW VIA DRIVER SHARED
    Sx_SetPass(cPassWord)
    Sx_DBFencrypt()

    // Browse will go in here.
    USE
RETURN
* EOP: Main
 
User avatar
Richard Chidiak
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France
Contact:

Re: SAMPSIX.PRG (in samples folder)

Post by Richard Chidiak »

Did you add hbsix.lib from xharbour if you are using xharbour or harbour ?

I think this is what you are missing

It is in the \lib folder of xharbour or harbour depending on what you use

Hth

Richard
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
User avatar
karinha
Posts: 4882
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: SAMPSIX.PRG (in samples folder)

Post by karinha »

Inclua HBSIX.LIB

#include "Hbsix.ch"

13/09/2012 10:46 152.576 sixapi.lib
10/06/2013 12:39 67.584 sixcdx.lib

http://www.ousob.com/ng/six3/index.php

https://groups.google.com/forum/#!msg/h ... 47MD87jmEJ

https://github.com/harbour/core/blob/ma ... e/hbsix.ch
Last edited by karinha on Tue Feb 18, 2014 4:49 pm, edited 5 times in total.
João Santos - São Paulo - Brasil
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: SAMPSIX.PRG (in samples folder)

Post by Enrico Maria Giordano »

HunterEC wrote:Here's the source code (as installed with FW 13.09):
I have FWH 13.11 and there is no such sample. From where did you get it?

EMG
User avatar
karinha
Posts: 4882
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: SAMPSIX.PRG (in samples folder)

Post by karinha »

// Perfect using SIXCDX.LIB

Code: Select all

/*
echo %hdirl%\hbsix.lib + >> b32.bc
echo %hdirl%\SixCdx.lib + >> b32.bc
*/

#include "FiveWin.ch"
#include "Inkey.ch"

//#include "Apollo.ch"  //??

#define DRIVER    "SIXCDX"

#xtranslate Sx_I_TagName()    => ORDNAME(ORDSETFOCUS())
#xtranslate Sx_I_IndexName()  => ORDBAGNAME()
#xtranslate Sx_KeysIncluded() => ORDKEYCOUNT()


FUNCTION Main()

    LOCAL cPassWord := "12345678"

    request SIXCDX

    rddRegister( "SIXCDX", 1 )
    rddsetdefault( "SIXCDX" )

    // SET FILETYPE TO SIXCDX  // ????

    ThreadSleep(100)

    SETCANCEL(.F.)
    SET _3DLOOK ON
    SET CENTURY ON
    SET CONFIRM OFF
    SET DELETED ON
    SET EPOCH TO 2000
    SET ESCAPE ON
    SET WRAP ON

    USE Customer NEW VIA DRIVER SHARED

    Sx_SetPass(cPassWord)
    Sx_DBFencrypt()

    BROWSE() // Perfect

    // Browse will go in here.
    USE
RETURN
* EOP: Main
 
João Santos - São Paulo - Brasil
HunterEC
Posts: 723
Joined: Tue Sep 04, 2007 8:45 am

Re: SAMPSIX.PRG (in samples folder)

Post by HunterEC »

Karinha:

I'm still getting linking errors. Can you send me your compiler batch file (BUILD?.BAT). Are you using xHarbour or Harbour ? I'm using FW 13.12 with it's bundled xHarbour / Harbour (I've tried both). Thank you very much.
User avatar
karinha
Posts: 4882
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: SAMPSIX.PRG (in samples folder)

Post by karinha »

BUILDX.BAT

Code: Select all

@ECHO OFF
CLS
ECHO ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
ECHO ³ FiveWin for xHarbour 13.06 - Jun. 2013          xHarbour development power ³Ü
ECHO ³ (c) FiveTech, 1993-2013   for Microsoft Windows 9X/NT/200X/ME/XP/Vista/7/8 ³Û
ECHO ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÛ
ECHO ÿ ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß

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

ECHO Compiling...

if "%FWDIR%" == "" set FWDIR=.\..\
if "%XHDIR%" == "" set XHDIR=c:\XHB100713
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=c:\bcc582
set fwh=%FWDIR%

%hdir%\bin\harbour %1 /m/n /i%fwh%\include;%hdir%\include /w0 /p %2 %3 > comp.log
REM %hdir%\bin\harbour %1 /m/n /i..\include;%hdir%\include /w0 /p %2 %3 > clip.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%\SixCdx.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%\libmisc.lib + >> b32.bc
echo %hdirl%\tip.lib + >> b32.bc
echo %hdirl%\png.lib + >> b32.bc
echo %hdirl%\hbhpdf.lib + >> b32.bc
echo %hdirl%\libharu.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\ws2_32.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\gdiplus.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 *

rem nuevo by Antoionio Linares - 16/05/2013
rem mshta vbscript:CreateObject("SAPI.SpVoice").Speak("Application successfully built")(Window.close)
rem mshta vbscript:CreateObject("SAPI.SpVoice").Speak("Programa construido com sucesso")(Window.close)

%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
João Santos - São Paulo - Brasil
Post Reply