Hi Marcos,

I'll tell you why you got that error.

You got that error because you linked the sample as a console app. So
that GUI handles are not initialized. GUI handles are initialized in
source/mainwin.c. As you _did_ not link the program as a Windows (GUI)
application, certainly the initialization is bypassed and error is
thrown. Remember this basic rule:

With Borland, you have to use c0w32.obj _instead_ of c0x32.obj and use
-aa switch. This will automatically link mainwin.obj to the app.

With MSVC, you have to define: /SUBSYSTEM:WINDOWS. That will do the same
as BCC as per above. (The default is: /SUBSYSTEM:CONSOLE)

With MINGW, you have to issue: -mwindows switch when linking

More: It is _NOT_ an xHarbour problem, but the programmer's problem :-)

Hope that helps.

Andi


On Mon, 23 Jul 2012 08:40:21 +0700
Andi Jahja <andi.ja...@yahoo.co.id> wrote:

> Hi Marcos,
> 
> Kindly post your LINK script. It is working fine here :-)
> 
> Andi
> 
> 
> On Sun, 22 Jul 2012 20:39:12 -0300
> Marcos Antonio Gambeta <marcos.gamb...@yahoo.com.br> wrote:
> 
> > This test work with BCC 5.5.1 and MSVC 2010:
> > 
> > request hb_gt_wvt
> > request hb_gt_wvt_default
> > procedure main ()
> > ? "teste"
> > inkey(0)
> > return
> > 
> > But all my attempts using MinGW result in the same error:
> > 
> > Unrecoverable error 10001:  It's not a GUI program.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
xHarbour-developers mailing list
xHarbour-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xharbour-developers

Reply via email to