Page 1 of 16

Migrating to Harbour

PostPosted: Wed Dec 10, 2014 11:40 am
by Enrico Maria Giordano
I get the following error:

Code: Select all  Expand view
Error: Unresolved external '_HB_FUN___CLSLOCKDEF'


What is this?

EMG

Re: Migrating to Harbour

PostPosted: Wed Dec 10, 2014 11:48 am
by Antonio Linares
Enrico,

It seems as you are not using the right Harbour libraries as such function is defined in classes.c and classes.obj belongs to hbrtl.lib

Please edit (with an ascii viewer, I use Total Commander) hbrtl.lib and look for CLSLOCKDEF inside it

Re: Migrating to Harbour

PostPosted: Wed Dec 10, 2014 12:28 pm
by Enrico Maria Giordano
Thank you, fixed.

One more problem: a console pops up when I run my EXEs. How to get rid of it?

EMG

Re: Migrating to Harbour

PostPosted: Wed Dec 10, 2014 1:13 pm
by Antonio Linares
Enrico,

Are you using the flag -aa when linking ?

Re: Migrating to Harbour

PostPosted: Wed Dec 10, 2014 2:32 pm
by Enrico Maria Giordano
Antonio,

yes.

EMG

Re: Migrating to Harbour

PostPosted: Wed Dec 10, 2014 2:36 pm
by Enrico Maria Giordano
Another one. I need this:

Code: Select all  Expand view
EXTEND CLASS TControl WITH DATA lSel


How can I do it with Harbour?

EMG

Re: Migrating to Harbour

PostPosted: Wed Dec 10, 2014 4:16 pm
by Enrico Maria Giordano
Another one: with Harbour I can't use CopyFile() to copy files with character like à. It returns .F.:

Code: Select all  Expand view
#include "Fivewin.ch"


FUNCTION MAIN()

    MEMOWRIT( "testà", "" )

    ? COPYFILE( "testà", "testb" )

    RETURN NIL


EMG

Re: Migrating to Harbour

PostPosted: Wed Dec 10, 2014 6:45 pm
by Enrico Maria Giordano
Enrico Maria Giordano wrote:One more problem: a console pops up when I run my EXEs. How to get rid of it?


The problem is that I'm linking both gtwin.lib and gtgui.lib. But if I remove gtwin.lib I get:

Code: Select all  Expand view
Error: Unresolved external '_HB_FUN_HB_GT_WIN' referenced from E:\HARBOUR\LIB\HBRTL.LIB|gtsys


Any ideas? I think I have to define gtsys() somewhere...

EMG

Re: Migrating to Harbour

PostPosted: Wed Dec 10, 2014 9:53 pm
by Antonio Linares
Enrico,

__clsAddMsg( hClass, "NewData" , 1, HB_OO_MSG_ACCESS )
__clsAddMsg( hClass, "_NewData" , 1, HB_OO_MSG_ASSIGN )

Please review tclass.prg from harbour source code

Re: Migrating to Harbour

PostPosted: Wed Dec 10, 2014 10:00 pm
by Enrico Maria Giordano
Antonio,

Antonio Linares wrote:Enrico,

__clsAddMsg( hClass, "NewData" , 1, HB_OO_MSG_ACCESS )
__clsAddMsg( hClass, "_NewData" , 1, HB_OO_MSG_ASSIGN )

Please review tclass.prg from harbour source code


Thank you, I will try them. And sorry, I don't have Harbour source code.

EMG

Re: Migrating to Harbour

PostPosted: Wed Dec 10, 2014 10:02 pm
by Enrico Maria Giordano
Any solutions for CopyFile() problem? It looks like something unicode related...

EMG

Re: Migrating to Harbour

PostPosted: Wed Dec 10, 2014 10:07 pm
by Enrico Maria Giordano
And, by the way, I'm still unable to get a working application with Harbour... :-(

EMG

Re: Migrating to Harbour

PostPosted: Wed Dec 10, 2014 10:15 pm
by Enrico Maria Giordano
Antonio,

Antonio Linares wrote: __clsAddMsg( hClass, "NewData" , 1, HB_OO_MSG_ACCESS )
__clsAddMsg( hClass, "_NewData" , 1, HB_OO_MSG_ASSIGN )


What is hClass?

EMG

Re: Migrating to Harbour

PostPosted: Thu Dec 11, 2014 8:14 am
by Antonio Linares
Enrico,

https://github.com/harbour/core/tree/master

Now you have Harbour full source code :-)

Re: Migrating to Harbour

PostPosted: Thu Dec 11, 2014 8:15 am
by Antonio Linares
Enrico,

hClass is the handle of a Class, you can access it this way:

TAnyClass():hClass

or directly from an existing object:

oObject:hClass