digitalmars.D.learn - Tango, usergdi32 problem, link prob i think..
- Chris Warwick (19/19) Mar 12 2007 Hi. i've installed tango but i'd been strugling to get the sys.win32 stu...
- Sean Kelly (8/32) Mar 12 2007 usergdi32.lib is linked by default for Tango/Win32, so something else is...
- Chris Warwick (3/34) Mar 13 2007 Yeah that has done the trick.. thanks.
Hi. i've installed tango but i'd been strugling to get the sys.win32 stuff 
happening. I keep getting this error when i build...
C:\Documents and Settings\chris\Desktop\dproj>bud Project1.d -full
OPTLINK (R) for Win32  Release 7.50B1
Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved
cjl\graphic.obj(graphic)
 Error 42: Symbol Undefined _SetDIBitsToDevice 48
The source line is this..
        int err = SetDIBitsToDevice(
            dc, x, y, fwidth, fheight,0, 0, 0,
            fheight, fpixels.ptr, &fheader, DIB_RGB_COLORS
            );
And it seems to do the same with all the gdi functions. Anyway I tried 
this..
version(build) { pragma(link, usergdi32); };
to get bud to link in usergdi32, but CreateWindowEx, and other non gdi 
functions are working ok so i dont think thats the problem.
And thanks everyone who's been helping me, its very much apreciated,
cw
 Mar 12 2007
Chris Warwick wrote:
 Hi. i've installed tango but i'd been strugling to get the sys.win32 stuff 
 happening. I keep getting this error when i build...
 
 C:\Documents and Settings\chris\Desktop\dproj>bud Project1.d -full
 OPTLINK (R) for Win32  Release 7.50B1
 Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved
 
 cjl\graphic.obj(graphic)
  Error 42: Symbol Undefined _SetDIBitsToDevice 48
 
 The source line is this..
 
         int err = SetDIBitsToDevice(
             dc, x, y, fwidth, fheight,0, 0, 0,
             fheight, fpixels.ptr, &fheader, DIB_RGB_COLORS
             );
 
 And it seems to do the same with all the gdi functions. Anyway I tried 
 this..
 
 version(build) { pragma(link, usergdi32); };
 
 to get bud to link in usergdi32, but CreateWindowEx, and other non gdi 
 functions are working ok so i dont think thats the problem.
usergdi32.lib is linked by default for Tango/Win32, so something else is 
going on.  I'd guess that perhaps the windows library that contains the 
implementation for this function is snot being linked.  The function 
lives in gdi32.lib, so try putting that in the pragma instead.  Tango's 
usergdi32.lib only contains constants and such.  The actual windows code 
lives elsewhere.
Sean
 Mar 12 2007
"Sean Kelly" <sean f4.ca> wrote in message news:et551e$8n7$1 digitalmars.com...Chris Warwick wrote:Yeah that has done the trick.. thanks.Hi. i've installed tango but i'd been strugling to get the sys.win32 stuff happening. I keep getting this error when i build... C:\Documents and Settings\chris\Desktop\dproj>bud Project1.d -full OPTLINK (R) for Win32 Release 7.50B1 Copyright (C) Digital Mars 1989 - 2001 All Rights Reserved cjl\graphic.obj(graphic) Error 42: Symbol Undefined _SetDIBitsToDevice 48 The source line is this.. int err = SetDIBitsToDevice( dc, x, y, fwidth, fheight,0, 0, 0, fheight, fpixels.ptr, &fheader, DIB_RGB_COLORS ); And it seems to do the same with all the gdi functions. Anyway I tried this.. version(build) { pragma(link, usergdi32); }; to get bud to link in usergdi32, but CreateWindowEx, and other non gdi functions are working ok so i dont think thats the problem.usergdi32.lib is linked by default for Tango/Win32, so something else is going on. I'd guess that perhaps the windows library that contains the implementation for this function is snot being linked. The function lives in gdi32.lib, so try putting that in the pragma instead. Tango's usergdi32.lib only contains constants and such. The actual windows code lives elsewhere.
 Mar 13 2007








 
  
  
  "Chris Warwick" <sp m.me.not>
 "Chris Warwick" <sp m.me.not>