comp.lang.ada
 help / color / mirror / Atom feed
From: Niklas Holsti <nholsti@icon.fi>
Subject: Re: non-visible declaration...error
Date: 1999/11/26
Date: 1999-11-26T00:00:00+00:00	[thread overview]
Message-ID: <383F11E1.B59C277F@icon.fi> (raw)
In-Reply-To: 383EE59D.6691E0F8@hrz.tu-chemnitz.de

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




      reply	other threads:[~1999-11-26  0:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-11-26  0:00 non-visible declaration...error andi
1999-11-26  0:00 ` Niklas Holsti [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox