ok Viktor
Thanks for the quick reply!
Brgds,
Leandro
--------------------------------------------------
From: "Viktor Szakáts" <harbour...@syenar.hu>
Sent: Friday, January 29, 2010 11:39 PM
To: "Harbour Project Main Developer List." <harbour@harbour-project.org>
Subject: Re: [Harbour] undefined reference to 'hb_stack'
Just delete '#include "hbvmopt.h"', it's an internal header, not needed.
Brgds,
Viktor
On 2010 Jan 30, at 02:34, Leandro Damasio wrote:
Hi
Attempting to build a program with the function below I receive the
following linkage error message:
undefined reference to `hb_stack'
The error is related to hb_retnint and hb_retni calls, because when I
ommit them the error message goes away.
What is wrong with the code please?
Thank you
Leandro
------------------------------------------------------
code (aseek.c)
#include "hbvmopt.h"
#include "hbapi.h"
#include "hbapiitm.h"
#include "hbvm.h"
#include "hbstack.h"
ULONG hb_arraySeek( PHB_ITEM pArray, PHB_ITEM pValue, PHB_ITEM pBlock,
BOOL bSoft , BOOL bExact, PHB_ITEM pMode );
HB_FUNC( ASEEK )
{
PHB_ITEM pArray = hb_param( 1, HB_IT_ARRAY );
PHB_ITEM pValue = hb_param( 2, HB_IT_ANY );
PHB_ITEM pBlock = hb_param( 3, HB_IT_ANY );
if( pArray && pValue )
{
BOOL bSoft = HB_ISLOG( 4 ) ? hb_parl ( 4 ): FALSE;
BOOL bExact = HB_ISLOG( 5 ) ? hb_parl ( 5 ): FALSE;
PHB_ITEM pMode = hb_param( 6, HB_IT_NUMINT );
hb_retnint( hb_arraySeek( pArray, pValue, pBlock, bSoft, bExact
,pMode ) );
}
else
hb_retni( 0 );
}
ULONG hb_arraySeek( PHB_ITEM pArray, PHB_ITEM pValue, PHB_ITEM pBlock,
BOOL bSoft , BOOL bExact, PHB_ITEM pMode )
{
...
}
/code (aseek.c)
hbide output console
----------------------------------------------------------------------------------------------------
Project [ 2DT ] Launch [ No ] Rebuild [ No ] Started [ 23:04:23 ]
----------------------------------------------------------------------------------------------------
Starting in: qt\4.5.3\bin : D:\2DL\FONTES\T_FONTES
hbmk2: Processando op‡äes do ambiente: -compiler=mingw
hbmk2: Processando arquivo de configura‡Æo: D:\HARBOUR\BIN\hbmk.cfg
hbmk2: Linha de comando do compilador Harbour: (interno)
(D:\HARBOUR\BIN\harbour.exe) -n2
D:/2DL/FONTES/T_FONTES/2DT.PRG -q -id:/harbour/include -iD:/2DL/INCLUDE/GENERAL
-iD:/2DL/INCLUDE/HB_2 -iD:/2DL/INCLUDE/2DWGUI
Harbour 2.1.0dev (Rev. 13736)
Copyright (c) 1999-2010, http://www.harbour-project.org/
hbmk2: Comando do compilador C/C++:
gcc.exe -c -O3 -march=i586 -mtune=pentiumpro -fomit-frame-pointer -Wall -W
-Id:/harbour/include -ID:/2DL/INCLUDE/GENERAL -ID:/2DL/INCLUDE/HB_2 -ID:/2DL/INCLUDE/2DWGUI
2DT.c C:\Users\Leo\AppData\Local\Temp\hbmk_tz229x.c
hbmk2: Comando do Linkeditor:
gcc.exe 2DT.o
hbmk_tz229x.o -mconsole -Wl,--start-group -l2dwgui -l2dbase -l2dsmart -lhbwin
-lhbextern -lhbdebug -lhbvm -lhbrtl -lhblang -lhbcpage -lgtcgi -lgtpca -lgtstd
-lgtwin -lgtwvt -lgtgui -lhbrdd -lhbuddall -lhbusrrdd -lrddntx -lrddcdx
-lrddnsx -lrddfpt -lhbrdd -lhbhsx -lhbsix -lhbmacro -lhbcplr -lhbpp -lhbcommon
-lkernel32 -luser32 -lgdi32 -ladvapi32 -lws2_32 -lwinspool -lcomctl32 -lcomdlg32
-lshell32 -luuid -lole32 -loleaut32 -lmpr -lwinmm -lmapi32 -limm32 -lmsimg32
-lwininet -lhbpcre -lhbzlib -Wl,--end-group -oD:/2DL/EXE/2DT.exe -Ld:/harbour/lib/win/mingw
-LD:/2DL/LIBS/2DWGUI -LD:/2DL/LIBS/2DBASE -LD:/2DL/LIBS/2DSMART
D:/2DL/LIBS/2DSMART/lib2dsmart.a(ASEEK.o):ASEEK.C:(.text+0xee): undefined
reference to `hb_stack'
D:/2DL/LIBS/2DSMART/lib2dsmart.a(ASEEK.o):ASEEK.C:(.text+0x113):
undefined reference to `hb_stack'
collect2: ld returned 1 exit status
hbmk2: Erro: Executando linkeditor. 1
gcc.exe 2DT.o
hbmk_tz229x.o -mconsole -Wl,--start-group -l2dwgui -l2dbase -l2dsmart -lhbwin
-lhbextern -lhbdebug -lhbvm -lhbrtl -lhblang -lhbcpage -lgtcgi -lgtpca -lgtstd
-lgtwin -lgtwvt -lgtgui -lhbrdd -lhbuddall -lhbusrrdd -lrddntx -lrddcdx
-lrddnsx -lrddfpt -lhbrdd -lhbhsx -lhbsix -lhbmacro -lhbcplr -lhbpp -lhbcommon
-lkernel32 -luser32 -lgdi32 -ladvapi32 -lws2_32 -lwinspool -lcomctl32 -lcomdlg32
-lshell32 -luuid -lole32 -loleaut32 -lmpr -lwinmm -lmapi32 -limm32 -lmsimg32
-lwininet -lhbpcre -lhbzlib -Wl,--end-group -oD:/2DL/EXE/2DT.exe -Ld:/harbour/lib/win/mingw
-LD:/2DL/LIBS/2DWGUI -LD:/2DL/LIBS/2DBASE -LD:/2DL/LIBS/2DSMART
----------------------------------------------------------------------------------------------------
Exit Code [ 7 ] Exit Status [ 0 ] Finished at [ 23:04:24 ] Done in [ 0.93
Secs ]
----------------------------------------------------------------------------------------------------
/hdide output console
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour