Page 1 of 1

harbour_for_mod_harbour error compiler

Posted: Tue Aug 20, 2019 9:01 am
by giuliano
Hi Antonio.
I'm trying to test mod_harbour . The first impression is EXCELLENT !!!
Using harbour language on the web with Apache is absolutely amazing . WOW ......

Toady I’m trying to build the harbour for mod_harbour exe compiler for later building an hrb file to include inside my project.
The command that I use is harbour64.bat and this is giving me a lot of errors.
I work in a Windows server machine using Visual studio 2019 -
These are only few lines of errors .....

apache_dyn.obj : error LNK2001: simbolo esterno HB_FUN_WAPI_TREEVIEW_SETCHECKSTATE non risolto
apache_dyn.obj : error LNK2001: simbolo esterno HB_FUN_WAPI_TREEVIEW_SETIMAGELIST non risolto
apache_dyn.obj : error LNK2001: simbolo esterno HB_FUN_WAPI_TREEVIEW_SETINDENT non risolto
apache_dyn.obj : error LNK2001: simbolo esterno HB_FUN_WAPI_TREEVIEW_SETINSERTMARK non risolto
apache_dyn.obj : error LNK2001: simbolo esterno HB_FUN_WAPI_TREEVIEW_SETINSERTMARKCOLOR non risolto
apache_dyn.obj : error LNK2001: simbolo esterno HB_FUN_WAPI_TREEVIEW_SETITEM non risolto
apache_dyn.obj : error LNK2001: simbolo esterno HB_FUN_WAPI_TREEVIEW_SETITEMHEIGHT non risolto
apache_dyn.obj : error LNK2001: simbolo esterno HB_FUN_WAPI_TREEVIEW_SETITEMSTATE non risolto
apache_dyn.obj : error LNK2001: simbolo esterno HB_FUN_WAPI_TREEVIEW_SETLINECOLOR non risolto
apache_dyn.obj : error LNK2001: simbolo esterno HB_FUN_WAPI_TREEVIEW_SETSCROLLTIME non risolto
apache_dyn.obj : error LNK2001: simbolo esterno HB_FUN_WAPI_TREEVIEW_SETTEXTCOLOR non risolto
............
apache_dyn.obj : error LNK2001: simbolo esterno HB_FUN_WAPI_TREEVIEW_SETBKCOLOR non risolto
..\..\..\..\..\bin\win\msvc64\harbour-32-x64.dll : fatal error LNK1120: 1539 esterni non risolti
../../../../../config/dyn.mk:111: recipe for target 'harbour-32-x64.dll' failed
../../config/dyn.mk:107: recipe for target 'descend' failed
../config/dir.mk:71: recipe for target 'dynlib' failed
config/dir.mk:71: recipe for target 'src' failed

Can you tell me where I’m wrong ?
Is there a new version of mod_harbour to download ?
Is there a way to download harbor_for_modharbour complete ?

Thanks a lot.
Giuliano

Re: harbour_for_mod_harbour error compiler

Posted: Tue Aug 20, 2019 10:44 am
by Antonio Linares
Dear Giuliano,

As we link contribs libs (PDF, curl, etc) inside libharbour.dll we can't build it using the standard Harbour makefile.

So when you reach to those errors (unresolved externals) then you have to continue it using this go.bat file:
https://github.com/FiveTechSoft/mod_har ... t%2Bhbcurl

Re: harbour_for_mod_harbour error compiler

Posted: Tue Aug 20, 2019 1:35 pm
by giuliano
Hi Antonio,
Thanks for your quickly answer .
My focus is to test some features of mod_harbour and one of this is HRB files (precompiled files) for LOAD it inside mod_harbour PRG .
The question is : how can i make HRB files ? What is the right way ?
So i don't need to recompile DLL but only to generate HRB files.

Thanks in advance..

Giuliano

Re: harbour_for_mod_harbour error compiler

Posted: Wed Aug 21, 2019 12:21 am
by Antonio Linares
to build the .hrb file do: harbour -gh -n testhrb.prg

Please review mod_harbour/samples/plugin.prg and testhrb.prg (and .hrb)

Re: harbour_for_mod_harbour error compiler

Posted: Wed Aug 21, 2019 6:38 am
by giuliano
Hi Antonio,
for do this test i need to obtain harbour.exe to build hrb file.
Where i find it ?
I've download all the sources for harbour_for_modharbour and recompile all
but I have the error i sent you .
Can you tell me where i can obtain harbour.exe with the last improvement ?
Thanks
Giuliano

Re: harbour_for_mod_harbour error compiler

Posted: Wed Aug 21, 2019 6:44 am
by Carles

Re: harbour_for_mod_harbour error compiler

Posted: Wed Aug 21, 2019 7:48 am
by giuliano
Thanks Carles,
I think we must use a particular release of harbour .
So i made a test with the official harbour release and i generate my first hrb files.
All is ok.

Now i've another problem . Some commands are giving error in compiling procedure
like DEFAULT values and TRY CATCH ...

Thanks to all
Giuliano

Re: harbour_for_mod_harbour error compiler

Posted: Wed Aug 21, 2019 3:09 pm
by giuliano
Hi to all,
here my example ( and errors ) :

Code: Select all

Function TEST(cstring)

local number:=0
DEFAULT cstring TO ""

IF cstring == "error"
    number:=18
ENDIF

TRY
    number++
CATCH
FINALLY
    number:=0
END

Return number
 
test.prg(4) Error E0030 Syntax error "syntax error at 'CSTRING'"
test.prg(10) Error E0020 Incomplete statement or unbalanced delimiters
test.prg(12) Error E0020 Incomplete statement or unbalanced delimiters
test.prg(13) Error E0020 Incomplete statement or unbalanced delimiters
test.prg(15) Error E0010 ENDIF does not match IF

Thanks
Giuliano

Re: harbour_for_mod_harbour error compiler

Posted: Wed Aug 21, 2019 5:19 pm
by wmormar
Amigo,

La linea 4 debe estar como sigue:

DEFAULT cString := ""

Saludos

Re: harbour_for_mod_harbour error compiler

Posted: Wed Aug 21, 2019 7:55 pm
by cnavarro
Also

Code: Select all

  hb_default( @cString, "" )
 

Re: harbour_for_mod_harbour error compiler

Posted: Thu Aug 22, 2019 6:19 am
by giuliano
Thanks cnavarro,
hb_default(.....) works perfectly.

Have you any solution for TRY CATCH ?

Bye
Giuliano

Re: harbour_for_mod_harbour error compiler

Posted: Thu Aug 22, 2019 6:44 am
by Antonio Linares
Giuliano,

TRY ... CATCH is already supported in mod_harbour

Please run ? hb_BuildDate() and let me know what you get

Re: harbour_for_mod_harbour error compiler

Posted: Thu Aug 22, 2019 7:26 am
by giuliano
Antonio,
i use harbour_msvc64_20190508.zip download
from a link you have posted in this forum.

http://forums.fivetechsupport.com/viewt ... lit=msvc64

Thanks
Giuliano

Re: harbour_for_mod_harbour error compiler

Posted: Thu Aug 22, 2019 7:51 am
by Antonio Linares
#xcommand TRY => BEGIN SEQUENCE WITH {| oErr | Break( oErr ) }

#xcommand CATCH [<!oErr!>] => RECOVER [USING <oErr>] <-oErr->

#xcommand FINALLY => ALWAYS

simply add these lines at the top of your PRGs, that you are going to turn into HRB files

Re: harbour_for_mod_harbour error compiler

Posted: Thu Aug 22, 2019 8:02 am
by giuliano
Perfect.
It works.
Thanks for your support

Giuliano