* non-visible declaration...error
@ 1999-11-26 0:00 andi
1999-11-26 0:00 ` Niklas Holsti
0 siblings, 1 reply; 2+ messages in thread
From: andi @ 1999-11-26 0:00 UTC (permalink / raw)
I would compile these rows an I became an error:
"wglCreateContext" is not visible
non-visible declaration at win32-wingdi.ads:9157
"wglMakeCurrent" is not visible
non-visible declaration at win32-wingdi.ads:9179
Hmm... I use the GNAT for WinNT - Compiler 3.12 with the
win32ada-binding
Here the code:
with System;
with Win32.Windef;
with Win32.Winuser;
with Win32.Winmain;
with Win32.Wingdi;
procedure prog is
-- some Var. and const
begin
-- Window creating things(handler,...)
-- OpenGl-init
RC := wglCreateContext(hInst);
wglMakeCurrent(hInst,RC);
-- some others
end prog;
What can I do ???
Thanx
andi
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: non-visible declaration...error
1999-11-26 0:00 non-visible declaration...error andi
@ 1999-11-26 0:00 ` Niklas Holsti
0 siblings, 0 replies; 2+ messages in thread
From: Niklas Holsti @ 1999-11-26 0:00 UTC (permalink / raw)
andi wrote:
>
> I would compile these rows an I became an error:
> "wglCreateContext" is not visible
> non-visible declaration at win32-wingdi.ads:9157
> "wglMakeCurrent" is not visible
> non-visible declaration at win32-wingdi.ads:9179
Those subprograms are declared in other packages that you
have (correctly) "withed", but since you haven't given "use"
clauses for these packages, the subprograms are not directly
visible; you must specify both the package name and the subprogram
name when calling the subprogram.
> Hmm... I use the GNAT for WinNT - Compiler 3.12 with the
> win32ada-binding
>
> Here the code:
>
> with System;
> with Win32.Windef;
> with Win32.Winuser;
> with Win32.Winmain;
> with Win32.Wingdi;
>
> procedure prog is
> -- some Var. and const
> begin
> -- Window creating things(handler,...)
>
> -- OpenGl-init
> RC := wglCreateContext(hInst);
Try RC := Win32.Wingdi.wglCreateContext(hInst);
> wglMakeCurrent(hInst,RC);
Try Win32.Wingdi.wglMakeCurrent(hInst,RC);
>
> -- some others
> end prog;
>
> What can I do ???
Either prefix each subprogram name with the package it comes
from, or add "use" clauses, for example
use Win32.Wingdi;
>
> Thanx
> andi
Hope it helps -- I haven't used Win32 myself, yet.
Niklas
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1999-11-26 0:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-11-26 0:00 non-visible declaration...error andi
1999-11-26 0:00 ` Niklas Holsti
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox