Page 1 of 1

/B Harbour Compiler option generated a unresolved external

Posted: Wed Dec 05, 2012 9:19 pm
by xhbcoder
Hello FiveWin / Antonio,

I am trying to compile with /B option but the linker generated the following error.

Turbo Incremental Link 5.69 Copyright (c) 1997-2005 Borland
Error: Unresolved external '_HB_FUN_HB_DECODE' referenced from C:\FWH\LIB\FIVEH.LIB|XBROWSE

Environment: FWH 11.06, Boralnd 586 and harbour included in FWh package.

What causes this and what is the work around?

Thank you,

Jose

Re: /B Harbour Compiler option generated a unresolved external

Posted: Thu Dec 06, 2012 11:53 am
by Antonio Linares
Jose,

Please link xhb.lib from Harbour too

Re: /B Harbour Compiler option generated a unresolved external

Posted: Thu Dec 06, 2012 4:31 pm
by xhbcoder
Hi Antonio,

Thanks for the quick reply. I link XHB.LIB and it builds the exe, but when I run the exe it is not showing.

How could I invoke the application build with the debug (/B) option ?

Do I need another application like the CLD.EXE with Clipper to run the exe in debugging mode?

Thank you and regards,

JOse

Re: /B Harbour Compiler option generated a unresolved external

Posted: Thu Dec 06, 2012 8:10 pm
by Antonio Linares
Jose,

Just compile using /b and FiveWin will link the debugger automatically.

Please place a MsgInfo( "here" ) at the beginning of your main PRG and check if it gets called.

Re: /B Harbour Compiler option generated a unresolved external

Posted: Thu Dec 06, 2012 11:11 pm
by xhbcoder
Antonio,

With /B option the msginfo box doesn't show up nor the application. But without /B it shows up and the application runs well.

The FWDbg.dll is also in the default folder.

What I am probably missing?

Thanks,

Jose

Re: /B Harbour Compiler option generated a unresolved external

Posted: Thu Dec 06, 2012 11:37 pm
by Antonio Linares
Jose,

Please try it with samples/tutor02.prg and check if it works

buildh.bat tutor02 /b

Re: /B Harbour Compiler option generated a unresolved external

Posted: Fri Dec 07, 2012 5:33 pm
by xhbcoder
Hi Antonio,

The Tutor02 works fine.

I linked gtwin.lib and added -Gn -aa linker switch as shown in BuildH.Bat. My application now shows some life but with a bunch of errors.

I think it's just the switches and settings but I can't find anymore from BuildH.bat that I can copy to my .MAK file.

Below are portions of my MAK file and runtime errors:

I hope there is something we can tweak. Thank you.

Jose

Portion of Runtime errors:
Unrecoverable error 9003: Too many recursive error handler calls
Called from ENABLE(0)
Called from TDBG:DBGCONTROL(525) in .\source\classes\FWDBG.PRG
Called from TDBG:EXEC(633) in .\source\classes\FWDBG.PRG
Called from __DBGENTRY(97) in .\source\classes\FWDBG.PRG
Called from ALERT(3900) in .\PCREGW.PRG
Called from DEFERROR(0) in ../../../errsys.prg
Called from (b)ERRORSYS(0) in ../../../errsys.prg
Called from ENABLE(0)
Called from TDBG:DBGCONTROL(525) in .\source\classes\FWDBG.PRG
Called from TDBG:EXEC(633) in .\source\classes\FWDBG.PRG
Called from __DBGENTRY(97) in .\source\classes\FWDBG.PRG
Called from ALERT(3900) in .\PCREGW.PRG
Called from DEFERROR(0) in ../../../errsys.prg
Called from (b)ERRORSYS(0) in ../../../errsys.prg
Called from ENABLE(0)
Called from TDBG:DBGCONTROL(525) in .\source\classes\FWDBG.PRG
Called from TDBG:EXEC(633) in .\source\classes\FWDBG.PRG
Called from __DBGENTRY(97) in .\source\classes\FWDBG.PRG
Called from ALERT(3900) in .\PCREGW.PRG
Called from DEFERROR(0) in ../../../errsys.prg
Called from (b)ERRORSYS(0) in ../../../errsys.prg
Called from ENABLE(0)

Library and switch portion of my MAk file:
echo $(HBDIR)\lib\hbrtl.lib + >> b32.bc
echo $(FWDIR)\lib\FiveH.lib $(FWDIR)\lib\FiveHC.lib + >> b32.bc
echo $(HBDIR)\lib\hbvm.lib + >> b32.bc
echo $(HBDIR)\lib\gtwin.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
echo $(HBDIR)\lib\xhb.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 pcreg.res echo pcreg.res >> b32.bc
$(BCDIR)\bin\ilink32 -Tpe -s @b32.bc > link.log
# $(BCDIR)\bin\ilink32 -Gn -aa -Tpe -s @b32.bc > link.log
# del b32.bc

.PRG.OBJ:
$(HBDIR)\bin\harbour $< /dFIVEWIN /dWIN /b /N /W1 /Oobj\ /I$(FWDIR)\include;$(HBDIR)\include > comp.log
$(BCDIR)\bin\bcc32 -c -tWM -I$(HBDIR)\include -oobj\$& obj\$&.c