Thread overview
Broken code in 0.163
Jul 18, 2006
Cris
Jul 18, 2006
BCS
Jul 18, 2006
Walter Bright
Jul 19, 2006
Cris
July 18, 2006
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());

}
July 18, 2006
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?
July 18, 2006
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.
July 19, 2006
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!