comp.lang.ada
 help / color / mirror / Atom feed
* argv and argc access?
@ 1998-09-28  0:00 J�rgen �hman
  1998-09-28  0:00 ` Steve Doiel
  1998-09-28  0:00 ` Frank Ecke
  0 siblings, 2 replies; 3+ messages in thread
From: J�rgen �hman @ 1998-09-28  0:00 UTC (permalink / raw)


I�m writing an opengl application using ada at my work. The application
needs to use full screen mode (not
just a maximized window).  The glut library provides a full screen mode
but to initialize glut i need to pass
the unmodified argv and argc c-parameters to the glutInit procedure.
But how can i access these in ada?
I have seen a couple of examples where they are imported:  (something
like)
  argc : aliased integer;
  pragma Import (C, argc, "gnat_argc");

but the linker doesn�t find the name ("link error: LNK2001: unsolved
external gnat_argc)
What am i supposed to do?

Thanks /J�rgen





^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: argv and argc access?
  1998-09-28  0:00 argv and argc access? J�rgen �hman
  1998-09-28  0:00 ` Steve Doiel
@ 1998-09-28  0:00 ` Frank Ecke
  1 sibling, 0 replies; 3+ messages in thread
From: Frank Ecke @ 1998-09-28  0:00 UTC (permalink / raw)


On Mon, 28 Sep 1998, J�rgen �hman <oh.man@lulea.mail.telia.com> wrote:

>I�m writing an opengl application using ada at my work. The application
>needs to use full screen mode (not
>just a maximized window).  The glut library provides a full screen mode
>but to initialize glut i need to pass
>the unmodified argv and argc c-parameters to the glutInit procedure.
>But how can i access these in ada?


The package Ada.Command_Line provides an interface to the command line.
In this package, ``Argument_Count, Argument, and Command_Name correspond to the
C language's argc, argv[N] (for N > 0), and argv[0], respectively.'' (A.15(22))


Hope this helps!


Frank

--
Frank Ecke <franke@minet.uni-jena.de>


       In a world without walls and fences, who needs windows and gates?




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: argv and argc access?
  1998-09-28  0:00 argv and argc access? J�rgen �hman
@ 1998-09-28  0:00 ` Steve Doiel
  1998-09-28  0:00 ` Frank Ecke
  1 sibling, 0 replies; 3+ messages in thread
From: Steve Doiel @ 1998-09-28  0:00 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 901 bytes --]

Try the function:

Win32.Winmain.Get_Lpcmdline

Which gives you access to the raw command line.  If you want to interpret
individual arguments then look to the portable command line interface:
Ada.Command_Line.

I hope this helps,
SteveD

J�rgen �hman wrote in message ...
>I�m writing an opengl application using ada at my work. The application
>needs to use full screen mode (not
>just a maximized window).  The glut library provides a full screen mode
>but to initialize glut i need to pass
>the unmodified argv and argc c-parameters to the glutInit procedure.
>But how can i access these in ada?
>I have seen a couple of examples where they are imported:  (something
>like)
>  argc : aliased integer;
>  pragma Import (C, argc, "gnat_argc");
>
>but the linker doesn�t find the name ("link error: LNK2001: unsolved
>external gnat_argc)
>What am i supposed to do?
>
>Thanks /J�rgen
>






^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1998-09-28  0:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-09-28  0:00 argv and argc access? J�rgen �hman
1998-09-28  0:00 ` Steve Doiel
1998-09-28  0:00 ` Frank Ecke

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