[gtkada] static

Thomas De Contes d.l.tDeContes at free.fr
Fri Aug 29 05:12:44 CEST 2003


Le samedi, 21 juin 2003, à 03:31 Europe/Paris, duliomatos a écrit :

>> so, gnat uses to create Dynamically linked binaries, and we can put
>> -largs -s to make it creating statically-linked binary, isn't it ?
>>
>> why is it a disadvantage that the needed libraries may not be present
>> on the target machine ???
>> i have to program a proprietary software ; if i've right understood, i
>> need to make statically-linked binary to allow users to put it on any
>> computer, isn't it ?
>>
>
> Actually the -largs -s option strips
> the debugging symbols from the file to
> make it smaller. To compile statically
> you should use
>
> "gnatmake -static
> program.adb -bargs -static"
>
> so that it
> won't depend on libgnat. For the
> executable not depend on libGtkAda you
> should use
>
> "gnatmake program.adb
> `gtkada-config --static`".
>
> Or you could use
> "gnatmake program.adb
> -static `gtkada-config --static`
> -bargs -static"
>
> so that your program
> will not depend on both.

thank you :-)

a friend typed
"gnatmake -IC:\GtkAda-2.2.0\include\gtkada -fstack-check -gnatoVa -k 
-gnatUwaF -O2 -static ed_net `gtkada-config --static` -bargs -static"
he got
"gnatmake: unknown switch: --static`"

then he tried "gnatmake -IC:\GtkAda-2.2.0\include\gtkada -fstack-check 
-gnatoVa -k -gnatUwaF -O2 -static ed_net -bargs -static"
it compiles, but the exe doesn't run on a pc with nothing installed on 
it

he used
"gnatmake -IC:\GtkAda-2.2.0\include\gtkada -fstack-check -gnatoVa -k 
-gnatUwaF -O2 ed_net"
to make non-static executables


what should he type exactly, please ? :-)




More information about the gtkada mailing list