comp.lang.ada
 help / color / mirror / Atom feed
* pragma Linker_Options
@ 2009-06-05  2:42 Rick
  2009-06-05  4:44 ` anon
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Rick @ 2009-06-05  2:42 UTC (permalink / raw)


The Ada LRM section B.1. refers to pragma Linker_Options.
Unfortunately, it does not list the options.

I use "-mwindows" to hide the command screen when Iwrite an interface
using GtkAda,  There are probably others.  Would someone please tell
me where to find them?

Thanks



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

* Re: pragma Linker_Options
  2009-06-05  2:42 pragma Linker_Options Rick
@ 2009-06-05  4:44 ` anon
  2009-06-05  7:43 ` Gautier
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: anon @ 2009-06-05  4:44 UTC (permalink / raw)


The options are what you use in the linker command line. This is an example 
that I use for Sockets to hide the library file that contains the Sockets library
from the command-line:

package GNAT.Sockets.Linker_Options is
   --  Empty version of this package.
private
   pragma Linker_Options ( "-lsocket" ) ;
end GNAT.Sockets.Linker_Options ;

Of course, there are other ways of using the "pragma", but mostly it used 
for library paths "-L" and libraries "-l".  Also, you must use a pragma for 
each option:

   ...
   pragma Linker_Options ( "-L/usr/lib/tcpip" ) ;
   pragma Linker_Options ( "-lsocket" ) ;
   ...


In <b0fc55f5-4142-4e34-a03f-aa14ea8caaba@o14g2000vbo.googlegroups.com>, Rick <rickduley@gmail.com> writes:
>The Ada LRM section B.1. refers to pragma Linker_Options.
>Unfortunately, it does not list the options.
>
>I use "-mwindows" to hide the command screen when Iwrite an interface
>using GtkAda,  There are probably others.  Would someone please tell
>me where to find them?
>
>Thanks




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

* Re: pragma Linker_Options
  2009-06-05  2:42 pragma Linker_Options Rick
  2009-06-05  4:44 ` anon
@ 2009-06-05  7:43 ` Gautier
  2009-06-05  8:52 ` Dmitry A. Kazakov
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Gautier @ 2009-06-05  7:43 UTC (permalink / raw)


Rick wrote:

> The Ada LRM section B.1. refers to pragma Linker_Options.
> Unfortunately, it does not list the options.
> 
> I use "-mwindows" to hide the command screen when Iwrite an interface
> using GtkAda,  There are probably others.  Would someone please tell
> me where to find them?

This is system-dependent; for instance "-mwindows" is specific to GNAT / 
GNU (and maybe GNU for MS Windows). If you google for "gnatlink options" 
and "gnu ld options" you'll find the gcc.gnu.org pages with all details.
HTH
_________________________________________________________
Gautier's Ada programming -- http://sf.net/users/gdemont/
NB: For a direct answer, e-mail address on the Web site!



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

* Re: pragma Linker_Options
  2009-06-05  2:42 pragma Linker_Options Rick
  2009-06-05  4:44 ` anon
  2009-06-05  7:43 ` Gautier
@ 2009-06-05  8:52 ` Dmitry A. Kazakov
  2009-06-05  9:22 ` Georg Bauhaus
  2009-06-05 10:10 ` anon
  4 siblings, 0 replies; 7+ messages in thread
From: Dmitry A. Kazakov @ 2009-06-05  8:52 UTC (permalink / raw)


On Thu, 4 Jun 2009 19:42:29 -0700 (PDT), Rick wrote:

> The Ada LRM section B.1. refers to pragma Linker_Options.
> Unfortunately, it does not list the options.
> 
> I use "-mwindows" to hide the command screen when Iwrite an interface
> using GtkAda,  There are probably others.  Would someone please tell
> me where to find them?

There is no any list because it depends on the linker used. So you should
first determine the linker your compiler uses. Then you refer to the manual
of the linker.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



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

* Re: pragma Linker_Options
  2009-06-05  2:42 pragma Linker_Options Rick
                   ` (2 preceding siblings ...)
  2009-06-05  8:52 ` Dmitry A. Kazakov
@ 2009-06-05  9:22 ` Georg Bauhaus
  2009-06-05 10:10 ` anon
  4 siblings, 0 replies; 7+ messages in thread
From: Georg Bauhaus @ 2009-06-05  9:22 UTC (permalink / raw)


Rick wrote:

> I use "-mwindows" to hide the command screen when Iwrite an interface
> using GtkAda,  There are probably others.  Would someone please tell
> me where to find them?

As has already been said, linker options are linker
specific and system specific.

Also, if you want your code to be portable, a configuration
file, like GNAT's project files, is a much better place
for linking options than the source proper.  Because
if you change the system, you do not have to change
the sources, only the the translation options that
the other compiler/system needs in its linking process.



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

* Re: pragma Linker_Options
  2009-06-05  2:42 pragma Linker_Options Rick
                   ` (3 preceding siblings ...)
  2009-06-05  9:22 ` Georg Bauhaus
@ 2009-06-05 10:10 ` anon
  4 siblings, 0 replies; 7+ messages in thread
From: anon @ 2009-06-05 10:10 UTC (permalink / raw)


For GNAT you can use all options except for mainprog.ali which must be given 
in the command line.  Also all options for ld (listed below). But it wiser to 
limit the use to special libraries or options like "-mwindows". It is better 
to use common options in a script file or the non-portable (GNAT only) 
project files.   

Also, read program documentation for details on options and if they could be 
conflicts if using a mix of options.



Usage: gnatlink switches mainprog.ali [non-Ada-objects] [linker-options]

  mainprog.ali   the ALI file of the main program

  -A    Binder generated source file is in Ada (default)
  -C    Binder generated source file is in C
  -f    force object file list to be generated
  -g    Compile binder source file with debug information
  -n    Do not compile the binder source file
  -v    verbose mode
  -v -v very verbose mode

  -o nam     Use 'nam' as the name of the executable
  -b target  Compile the binder source to run on target
  -Bdir      Load compiler executables from dir
  --GCC=comp Use comp as the compiler
  --LINK=nam Use 'nam' for the linking rather than 'gcc'

  [non-Ada-objects]  list of non Ada object files
  [linker-options]   other options for the linker


Usage: ld [-d] [-dc] [-dp] [-e symbol] [-l lib] [-n] [-noinhibit-exec]
       [-nostdlib] [-o file] [-r] [-s] [-t] [-u symbol] [-x] [-y symbol]
       [-z] [-A file] [-Bstatic] [-D size] [-L libdir] [-M] [-N]
       [-S] [-T[{text,data}] addr] [-V prefix] [-X] [file...]


In <b0fc55f5-4142-4e34-a03f-aa14ea8caaba@o14g2000vbo.googlegroups.com>, Rick <rickduley@gmail.com> writes:
>The Ada LRM section B.1. refers to pragma Linker_Options.
>Unfortunately, it does not list the options.
>
>I use "-mwindows" to hide the command screen when Iwrite an interface
>using GtkAda,  There are probably others.  Would someone please tell
>me where to find them?
>
>Thanks




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

* Re: pragma Linker_Options
@ 2009-06-05 22:55 rickduley
  0 siblings, 0 replies; 7+ messages in thread
From: rickduley @ 2009-06-05 22:55 UTC (permalink / raw)


My thanks to all who responded to my posting.
I'll sit down with a cup of coffee and digest all that.
I'll get the hang of it :)



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

end of thread, other threads:[~2009-06-05 22:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-05  2:42 pragma Linker_Options Rick
2009-06-05  4:44 ` anon
2009-06-05  7:43 ` Gautier
2009-06-05  8:52 ` Dmitry A. Kazakov
2009-06-05  9:22 ` Georg Bauhaus
2009-06-05 10:10 ` anon
  -- strict thread matches above, loose matches on Subject: below --
2009-06-05 22:55 rickduley

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