Migrating to Harbour

Post Reply
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Migrating to Harbour

Post by Enrico Maria Giordano »

I get the following error:

Code: Select all

Error: Unresolved external '_HB_FUN___CLSLOCKDEF'
What is this?

EMG
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Migrating to Harbour

Post 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
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Migrating to Harbour

Post 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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Migrating to Harbour

Post by Antonio Linares »

Enrico,

Are you using the flag -aa when linking ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Migrating to Harbour

Post by Enrico Maria Giordano »

Another one. I need this:

Code: Select all

EXTEND CLASS TControl WITH DATA lSel
How can I do it with Harbour?

EMG
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Migrating to Harbour

Post 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

#include "Fivewin.ch"


FUNCTION MAIN()

    MEMOWRIT( "testà", "" )

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

    RETURN NIL
EMG
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Migrating to Harbour

Post 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

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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Migrating to Harbour

Post 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
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Migrating to Harbour

Post 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
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Migrating to Harbour

Post by Enrico Maria Giordano »

Any solutions for CopyFile() problem? It looks like something unicode related...

EMG
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Migrating to Harbour

Post by Enrico Maria Giordano »

And, by the way, I'm still unable to get a working application with Harbour... :-(

EMG
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Migrating to Harbour

Post 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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Migrating to Harbour

Post by Antonio Linares »

Enrico,

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

Now you have Harbour full source code :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Migrating to Harbour

Post 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
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply