www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Broken code in 0.163

reply Cris <central_p hotmail.com> writes:
Any ideas why this code is broken in the newest compiler? The wgl functions are 
not recognized. This is from the bobef's glee.d

I had a few more problems with the change of the import defaults but I've fixed 
them. With the wgl function I have no idea what is wrong.

char *__GLeeGetExtStrPlat()
{
version(Windows)
{
	if (!_GLEE_WGL_ARB_extensions_string)
		pwglGetExtensionsStringARB = cast(PFNWGLGETEXTENSIONSSTRINGARBPROC) 
wglGetProcAddress("wglGetExtensionsStringARB");

	if (pwglGetExtensionsStringARB)
		return cast(char *)pwglGetExtensionsStringARB(wglGetCurrentDC());

}
Jul 18 2006
next sibling parent BCS <BCS pathlink.com> writes:
Cris wrote:
 Any ideas why this code is broken in the newest compiler? The wgl 
 functions are not recognized. This is from the bobef's glee.d
 
 I had a few more problems with the change of the import defaults but 
 I've fixed them. With the wgl function I have no idea what is wrong.
 
 char *__GLeeGetExtStrPlat()
 {
 version(Windows)
 {
     if (!_GLEE_WGL_ARB_extensions_string)
         pwglGetExtensionsStringARB = 
 cast(PFNWGLGETEXTENSIONSSTRINGARBPROC) 
 wglGetProcAddress("wglGetExtensionsStringARB");
 
     if (pwglGetExtensionsStringARB)
         return cast(char *)pwglGetExtensionsStringARB(wglGetCurrentDC());
 
 }
I assume that you have made sure that the modules with each simple is imported directly or indirectly by way of explicit "public" imports?
Jul 18 2006
prev sibling next sibling parent Walter Bright <newshound digitalmars.com> writes:
Cris wrote:
 Any ideas why this code is broken in the newest compiler? The wgl 
 functions are not recognized. This is from the bobef's glee.d
Almost certainly it's because the module needs another "import" declaration for the module that defines the functions.
Jul 18 2006
prev sibling parent Cris <central_p hotmail.com> writes:
Thank you... I've fixed all modules. I had to check each and every one to find
all 
imports that had to be declared as public

I've thought that the WGL functions are declared in std.c.windows.windows!

:) Happy fixing, Everybody!
Jul 18 2006