Harbour Compiler Build Questions ! UPDATED *

Harbour Compiler Build Questions ! UPDATED *

Postby TimStone » Thu Jun 09, 2011 12:05 am

I'm using FWH 11.4, Harbour ( Microsoft Build ) and the builder in UE Studio, plus Visual Studio 2010 VC++. Here are some basic questions regarding Harbour that I don't see in the documents:

1) How do I specify the primary .prg when building the program ?

2) How do I include ADS, and is their a difference in implementing xHarbour vs Harbour ADS ?

3) I notice a difference between AT( ) implementation in Harbour and xHarbour. The 2nd supports param 3&4 for the range to search. Is there an alternative in Harbour ?

4) Some xHarbour functions are not found in Harbour. Are their substitutes ? I am looking for DiskTotal(), DiskFree(), CurDrive(), TipClientHTTP( ).

5) Anyone know the file to handle the following unresolved externals in Harbour ? _pcre_free, _pcre_compile , _pcre_exec, _pcre_stack_free, _pcre_stack_malloc, and _pcre_malloc referenced in functions regfree, regcomp, regexec, hb_regex_init

Any help will be greatly appreciated. :)
Last edited by TimStone on Fri Jun 10, 2011 4:23 pm, edited 1 time in total.
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2904
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Harbour Compiler basic questions

Postby nageswaragunupudi » Thu Jun 09, 2011 3:29 am

Many, but not all, xHarbour extensions, not found in Harbour natively can be obtained by linking with xhb.lib. Available in Harbour\lib folder.

Some functions have different names in Harbour and xHarbour. By including "hbcompat.ch" ( from \harbour\include or \xharbour\include ) we can use either syntax and compile either with either.

Examples: DateTime() in xHarbour is HB_DateTime() in Harbour.

Still there will remain a few differences. We may need to write conditional code within our programs.

Examples: TTOC() of xHarbour and HB_TToC() are similar but have some differences.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10248
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Harbour Compiler basic questions

Postby Antonio Linares » Thu Jun 09, 2011 6:59 am

Tim,

Use HB_CurDrive() instead of CurDrive()

Regarding the UEStudio question I guess Otto may help here as he is a great UEStudio master! :-)
regards, saludos

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

Re: Harbour Compiler basic questions

Postby Antonio Linares » Thu Jun 09, 2011 7:00 am

Tim,

Regarding 5) please link hbpcre.lib from Harbour :-)
regards, saludos

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

Re: Harbour Compiler basic questions

Postby Antonio Linares » Thu Jun 09, 2011 7:08 am

Tim,

2) Please provide ace.h and ace32.dll used by you, thanks

It should work the same way as in xharbour
regards, saludos

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

Re: Harbour Compiler basic questions

Postby TimStone » Thu Jun 09, 2011 4:41 pm

Here are my questions still "in play"

1) Antonio, I have no ace32.lib or ace.h included with the harbour build you supply I have one that works with xBuilder ( Pelles C ). I also tried the one from the Harbour.org site that was for VC 2008.
2) With the fivehm.lib you supplied, it shows unidentified OleInvoke, OleSetProperty, OleGetProperty, and ARead. Perhaps there is another library that needs to be linked in.
3) I still need a replcement for DiskTotal( ) and DiskFree( ) functions found in xHarbour

Finally, xHarbour ( .com version ? ) has a function TipClientHTTP( ). This allows us to do an XML transaction ( simple ). Is there an equivalent in Harbour ?

I removed the calls for ADS for now and am closer ( I think ) to getting an actual build.

Also, I still wonder how to designate the primary .prg in the UEStudio configuration. I would imagine anyone doing builds in UE even with Borland has faced this issue.

Thanks for all the guidance.
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2904
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Harbour Compiler basic questions

Postby nageswaragunupudi » Thu Jun 09, 2011 6:34 pm

3) I still need a replcement for DiskTotal( ) and DiskFree( ) functions found in xHarbour

\harbour\lib\hbct.lib
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10248
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Harbour Compiler basic questions

Postby Otto » Thu Jun 09, 2011 8:56 pm

Hello Tim,
1) How do I specify the primary .prg when building the program ?

You have to define in your prj-file inside the key [Files] the prg-file which includes “function main” as first file.

[Files]
0=test1.prg // prg which function main
1=.prg
2=.prg
3=.PRG

Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6009
Joined: Fri Oct 07, 2005 7:07 pm

LINK w/ /TLBID ?

Postby TimStone » Fri Jun 10, 2011 4:22 pm

Otto, in this case in my project the first file happens to be the "main" .prg ... I'll look at this closer to see where I define it otherwise.

Nages... I am linking that .lib but the linker said the two functions were not found.

NEW QUESTION:

The Microsoft link program is throwing an error with the inclusion of the .rc file. CVTRES CVT100 doplicate Resource BITMAP HRPM language 0, 0409. When researching this, it tells me the linker duplication is actually the ID number 1 which was assigned to a .lib created by the linker itself, and I need to use /TLBID with a number less than 65535 in the link script. That is fine, but nowhere can I find the format for specifying the number. If I try /TLBID 600 it tells me no value is specified for TLBID. If I set /TLBID=600 it tells me this is an illegal command. A search of the net does not provide a specification for how the number is to be passed ! Does anyone know how to implement /TLBID with the linker ?
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2904
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Harbour Compiler Build Questions ! UPDATED *

Postby Antonio Linares » Fri Jun 10, 2011 8:49 pm

regards, saludos

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

Re: Harbour Compiler Build Questions ! UPDATED *

Postby TimStone » Sat Jun 11, 2011 2:42 am

Antonio,

I saw that article and about 20 others but none explain how to pass the number.

/TLBID 6000 says no parameter is passed
/TLBID=6000 gets a bad command error
/TLBID:6000 does not generate an error itself, but the same error message is displayed.

From MSDN: When compiling a program that uses attributes, the linker will create a type library. The linker will assign a resource ID of 1 to the type library. If this resource ID conflicts with one of your existing resources, you can specify another ID with /TLBID. The range of values that you can pass to id is 1 to 65535.

So the linker creates a type library, but then when it tries to link in the .res file, the very first resource it wants to apply is 1, so there is a conflict. Comment out the resource, and the next one will generate the error.

In the test sample we worked with to initially get this running, the .rc file we used had no resources. Thus, we did not generate the error. I don't understand the "attributes" issue, so I don't know if they can be turned off, or how we handle this. This issue is not just with VC 2010's linker. I've seen it date back to VB 6 in the posts. Has no one built an application with the Microsoft Linker ? If someone has, how do you handle this issue ?

Thanks all.

Tim
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2904
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Harbour Compiler Build Questions ! UPDATED *

Postby Antonio Linares » Sat Jun 11, 2011 8:28 am

Tim,

I have modified UEStudio Application_vc32 this way:
...
Cmd0 = LINK $(LOPT) $FGO $FGR $(LIBS1) $(LIBS2) "$(SDKPATHL)"\kernel32.lib ...
...
Cmd0 = c:\vc98\bin\rc -r /i"c:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A"\include -fo$O $I
...

And it is properly building dialog_vc32.wiz (that uses a RC with a dialog!) with no errors at all (those ones that you described).

Please check this and try to build it there, thanks :-)
regards, saludos

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

Re: Harbour Compiler Build Questions ! UPDATED *

Postby TimStone » Sat Jun 11, 2011 10:24 pm

Antonio,

I tried your solution with a slight modification. I don't have vc98 on my computer but I did try it with the rc.exe in the SDK bin, and also with the VC 2005 bin folders. First, with the SDK, it does not like the /i"c:\Program ...." statement it gave me an incorrect useage, and wanted me to run RC /?. Using 2005, I get the same CVTRES fatal error CYT1100 that I referenced previously.

However, I linked in the .res file created with xbuilder.com ( Pelles c ) and it links fine. So we are close, but we still have some problems compiling the .rc to .res using MS rc compiler. I'm sure we will resolve it.

Just a couple of cleanup notes. On my compiler setup we have a LIB3 folder that includes the additional files you put into Cmd 0. ( Also, I had already added $FGR ). That actually makes it cleaner. I'll send you a copy once I clean out the duplication so you can add it to the FWH 11.6 distribution.

I will test the RDDADS library later and respond.

Tim
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2904
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Harbour Compiler Build Questions ! UPDATED *

Postby Antonio Linares » Sun Jun 12, 2011 4:19 am

Tim,

I email you VC98 rc.exe, lets see if that makes a difference, thanks
regards, saludos

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

Re: Harbour Compiler Build Questions ! UPDATED *

Postby TimStone » Mon Jun 13, 2011 10:41 pm

Here are my latest findings with the use of Visual C++ / Visual Studio 2010, Harbour, and FWH. The build is created using UE Studio.

1) UE Studio is nice for doing these builds because you can edit files in the project, and do builds with a single button press ! It works fine with the builds Antonio has created ( beta now, release perhaps in 11.6 ).

2) We finally got it to build .res from .rc files but we needed to go back to VC 98's RC.exe to do so. Newer versions have problems with crossover of symbols. You can simply attach an existing .res file into the link, but that adds the need for other resources.

3) Trying to add in ADS is simply not working. I used IMPLIB32.exe to create a .lib ACE32 file as suggested,and then linked it in with rddads, but I get a huge number of undefineds for all the ADS functions. I'm using basic commands that are readily supported in xHarbour ( xBuilder ). Here is the .lnk line for Harbour files ... perhaps the order needs to be changed ? Any thoughts ?

LIBS2 = $(HPATHL)\hbrtl.lib $(HPATHL)\hbvm.lib $(HPATHL)\gtgui.lib $(HPATHL)\hblang.lib $(HPATHL)\hbmacro.lib $(HPATHL)\hbrdd.lib $(HPATHL)\rddntx.lib $(HPATHL)\rddcdx.lib $(HPATHL)\rddfpt.lib $(HPATHL)\hbsix.lib $(HPATHL)\rddads.lib $(HPATHL)\ace32.lib $(HPATHL)\hbdebug.lib $(HPATHL)\hbcommon.lib $(HPATHL)\hbpp.lib $(HPATHL)\hbcpage.lib $(HPATHL)\hbwin.lib $(HPATHL)\hbct.lib $(HPATHL)\xhb.lib

4) If I take out calls to ADS, and configure it for DBFCDX, the program will run. HOWEVER ( and this is huge ), it is painfully slow. The same program built with xHarbour ( xBuilder, Pelles C ) must be 10 to 20 times faster to display and fill a dialog box. With xBuilder version its almost instant to see the dialog but with the Harbour / VC version, you can actually watch the screen being painted and data applied. It rather staggers !

Any thoughts on any of these comments ? Hopefully we will be able to resolve these issues and see great results.
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2904
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 90 guests