Upgrading FWH/xHarbour & VS 2010

Re: Upgrading FWH/xHarbour & VS 2010

Postby DonDrew » Mon Apr 22, 2013 11:37 am

It's solved.

Thanks, Antonio.
DonDrew
 
Posts: 63
Joined: Mon Aug 02, 2010 5:38 pm

Re: Upgrading FWH/xHarbour & VS 2010

Postby Antonio Linares » Mon Apr 22, 2013 11:38 am

glad to hear that :-)
regards, saludos

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

Re: Upgrading FWH/xHarbour & VS 2010

Postby DonDrew » Wed Apr 24, 2013 10:31 am

Is there any way that I can force Harbour to write its warnings to a text file?
DonDrew
 
Posts: 63
Joined: Mon Aug 02, 2010 5:38 pm

Re: Upgrading FWH/xHarbour & VS 2010

Postby Antonio Linares » Wed Apr 24, 2013 11:34 am

Don,

Have you tried redirecting its output ?

harbour.exe /n tes.prg > comp.log
regards, saludos

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

Re: Upgrading FWH/xHarbour & VS 2010

Postby DonDrew » Wed Apr 24, 2013 12:25 pm

Yes, I did.

$(HBDIR)bin\harbour $< /n /w2 /o$(CSRCDIR) /i$(FWDIR)include;$(HBDIR)include > Warnings.log

The actual warnings scroll to the screen.

This is what appears in Warnings.log:
Code: Select all  Expand view
Harbour 3.2.0dev (Rev. 18881)
Copyright (c) 1999-2013, http://harbour-project.org/
Compiling 'e:\aba\aba_4\Locals.prg'...

100

200

300

100

100

100

100

200

300

400

500

600

100

200

100

200

100

200

100

200

300

400

500

600

700

800

900

1000

1100

1200

1300

1400

1500

1600

1700

100

100

100

100

200

100

200

300

400

500

600

700

800

900

1000

1100

1200

1300

1400

1500

1600

1700

Lines 7024, Functions/Procedures 29
Generating C source output to 'e:\aba\aba_4\csrc\Locals.c'... Done.
 
DonDrew
 
Posts: 63
Joined: Mon Aug 02, 2010 5:38 pm

Re: Upgrading FWH/xHarbour & VS 2010

Postby Antonio Linares » Wed Apr 24, 2013 3:11 pm

Don,

I was able to redirect that output in Harbour but had to change some code in harbour compiler.

In other words, to have that, you need a non standard Harbour. Or it can be reported to the Harbour developers list and wait for them to attend your request.
regards, saludos

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

Re: Upgrading FWH/xHarbour & VS 2010

Postby DonDrew » Wed Apr 24, 2013 3:27 pm

My goodness, Antonio, I hadn't expected you to go to all that effort. Thank you!

If it makes sense to add the ability to direct warnings to a text file to future versions of Harbour, please do. In the meantime I'll find another way of capturing the warnings.

Again, thanks for your help.

Saludos,
Don
DonDrew
 
Posts: 63
Joined: Mon Aug 02, 2010 5:38 pm

Re: Upgrading FWH/xHarbour & VS 2010

Postby Antonio Linares » Thu Apr 25, 2013 11:31 am

Don,

No problem, I already had done it for my own needs in the past :-)

There is a standard way in Harbour to redirect those outputs, but there was no agreement to change its behavior (suplying a parameter from the command line, etc)

Anyhow, if we need it, you can have it :-)
regards, saludos

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

Re: Upgrading FWH/xHarbour & VS 2010

Postby DonDrew » Thu Apr 25, 2013 1:24 pm

Yes, Antonio, I would love to have that feature as soon as it is available.
DonDrew
 
Posts: 63
Joined: Mon Aug 02, 2010 5:38 pm

Re: Upgrading FWH/xHarbour & VS 2010

Postby Antonio Linares » Thu Apr 25, 2013 1:49 pm

Don,

I have asked it on the Harbour devel list to wait for an "official" answer :-)
https://groups.google.com/forum/?fromgroups=#!topic/harbour-devel/o6dwjM2G-S0

Anyhow, I found my notes about the research that I did for it:
Code: Select all  Expand view
In harbour/src/compiler/hbmain.c:

static void * pOutStdFunc = NULL;
static void * pOutErrFunc = NULL;

void setOutStd( void * p )
{
  pOutStdFunc = p;
}

void setOutErr( void * p )
{
  pOutErrFunc = p;
}

en int hb_compMainExt():

  HB_COMP_PARAM->pOutPath = NULL;

  if( pOutStdFunc )
     HB_COMP_PARAM->outStdFunc = pOutStdFunc;

  if( pOutErrFunc )
     HB_COMP_PARAM->outErrFunc = pOutErrFunc;
 
regards, saludos

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

Re: Upgrading FWH/xHarbour & VS 2010

Postby Antonio Linares » Thu Apr 25, 2013 2:30 pm

Don,

On the Harbour list a "tee" utility was suggested:
http://www.commandline.co.uk/mtee/index.html

but I have tested it here (unless I did it wrong) and it does not redirect the Harbour warnings...
regards, saludos

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

Re: Upgrading FWH/xHarbour & VS 2010

Postby DonDrew » Thu Apr 25, 2013 3:59 pm

I couldn't make it work either, Antonio.

For now I'm just going to be content to wait for the official Harbour version.
DonDrew
 
Posts: 63
Joined: Mon Aug 02, 2010 5:38 pm

Re: Upgrading FWH/xHarbour & VS 2010

Postby Antonio Linares » Mon Apr 29, 2013 10:20 am

Don,

I found a really easy way to redirect the warnings! :-)

As easy as:

harbour -n -I... myapp 2>warnings.log
@type warnings.log

Please notice that 2 and > have to be together. so this is valid "2> warnings.log" but this will not work: "2 > warnings.log"

We have modified FWH samples\buildh.bat so from now on, warnings will be redirected to warnings.log :-)
regards, saludos

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

Re: Upgrading FWH/xHarbour & VS 2010

Postby DonDrew » Mon Apr 29, 2013 11:34 am

Brilliant, Antonio, it worked!

I had tried that but with the space btw the '2' and '>.'

Thanks!
DonDrew
 
Posts: 63
Joined: Mon Aug 02, 2010 5:38 pm

Re: Upgrading FWH/xHarbour & VS 2010

Postby James Bott » Mon Apr 29, 2013 1:57 pm

Don,

All the problems you have had setting up a new compiler, illustrate why it is important to start out with just a simple "Hello World" program instead of a complex one. This eliminates all the possible issues with your complex program so you only have to deal with issues with the new compiler.

Regards,
James

Experience is the best teacher. Unfortunately, the tuition is very expensive. -Ben Franklin
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 24 guests