comp.lang.ada
 help / color / mirror / Atom feed
* Problem with GNAT linking
@ 2004-11-26 18:18 Daniel W
  2004-11-26 21:24 ` Adrien Plisson
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel W @ 2004-11-26 18:18 UTC (permalink / raw)


Greetings, after having spent years and years off Ada, I just the other week 
figured I'd try out some Gnat stuff. Fired up AdaGide and all examples 
worked fine. After putting it away for a week, I found that it stopped 
working. A cannot recall changing anything in the configuration after it 
worked the last time.

Below is the verbose output from gnatmake. I can understand why the linker 
is objecting. But wherefrom does gnatmake take these parameters?

Could someone please 1) see the obvious problem or 2) explain exactly how 
gnatmake (and gnatlink) generates its "ld-command"

Daniel Wengelin, a.k.a Eternally grateful (running gnat 3.15p on WinXP, with 
ADA_OBJECTS_PATH="c:\GNAT\Bindings\Win32Ada;C:\GNAT\lib\win32;C:\Program 
Files\XMLBooster\ada")



C:\GNAT\Examples>gnatmake text_io_example.adb -largs --verbose
gnatbind -x text_io_example.ali
gnatlink --verbose text_io_example.ali
Reading specs from C:\GNAT\lib\gcc-lib\pentium-mingw32msv\2.8.1\specs
gcc version 2.8.1
 ld -o text_io_example.exe 
C:\GNAT\lib\gcc-lib\pentium-mingw32msv\2.8.1\crt2.o -L./ -Lc:\GNAT\Bindings\Win32Ada\ 
 -LC:\GNAT\lib\win32\ -LC:\Program 
Files\XMLBooster\ada" -LC:\GNAT\lib\gcc-lib\pentiummingw32msv\2.8.1\adalib\ 
C:\GNAT\lib\gcc-lib\pentium-mingw32msv\2.8.1\adalib\libgnat.a -Wl,--stack=0x2000000 
 -LC:\GNAT\lib\gcc-lib\pentium-mingw32msv\2.8.1 -LC:\GNAT\lib -LC:\GNAT\lib 
b~text_io_example.o 
./text_io_example.o -lmingw32 -lgcc -lmoldname -lmsvcrt -lkernel32 -ladvapi32
 -lshell32 -lmingw32 -lgcc -lmoldname -lmsvcrt
ld: unrecognized option 
'C:\GNAT\lib\gcc-lib\pentium-mingw32msv\2.8.1\adalib\libgnat.a'
ld: use the --help option for usage information
gnatlink: cannot call C:\GNAT\bin\gcc.exe
gnatmake: *** link failed.

C:\GNAT\Examples> 





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

* Re: Problem with GNAT linking
  2004-11-26 18:18 Problem with GNAT linking Daniel W
@ 2004-11-26 21:24 ` Adrien Plisson
  2004-11-26 21:41   ` Daniel W
  0 siblings, 1 reply; 3+ messages in thread
From: Adrien Plisson @ 2004-11-26 21:24 UTC (permalink / raw)


Daniel W wrote:
>  ld -o text_io_example.exe 
> C:\GNAT\lib\gcc-lib\pentium-mingw32msv\2.8.1\crt2.o -L./ -Lc:\GNAT\Bindings\Win32Ada\ 
>  -LC:\GNAT\lib\win32\ -LC:\Program 

look here --------------------------^

> Files\XMLBooster\ada" -LC:\GNAT\lib\gcc-lib\pentiummingw32msv\2.8.1\adalib\ 
> C:\GNAT\lib\gcc-lib\pentium-mingw32msv\2.8.1\adalib\libgnat.a -Wl,--stack=0x2000000 
>  -LC:\GNAT\lib\gcc-lib\pentium-mingw32msv\2.8.1 -LC:\GNAT\lib -LC:\GNAT\lib 
> b~text_io_example.o 
> ./text_io_example.o -lmingw32 -lgcc -lmoldname -lmsvcrt -lkernel32 -ladvapi32
>  -lshell32 -lmingw32 -lgcc -lmoldname -lmsvcrt
> ld: unrecognized option 

GNAT does not like long file names with spaces. 2 solutions:
- find a way to specify a shot path, eg. C:\Progra~1\XMLBoo~1\ada,
- find a way to specify arguments with double quotes, although i'm not 
sure GNAT will like this.

-- 
rien




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

* Re: Problem with GNAT linking
  2004-11-26 21:24 ` Adrien Plisson
@ 2004-11-26 21:41   ` Daniel W
  0 siblings, 0 replies; 3+ messages in thread
From: Daniel W @ 2004-11-26 21:41 UTC (permalink / raw)


Will this work? Yessss, Glorious! Thanks soooooo much!!
"Adrien Plisson" <aplisson-news@stochastique.net> wrote in message 
news:41a79eaa$0$9304$ba620e4c@news.skynet.be...
> Daniel W wrote:
>>  ld -o text_io_example.exe 
>> C:\GNAT\lib\gcc-lib\pentium-mingw32msv\2.8.1\crt2.o -L./ -Lc:\GNAT\Bindings\Win32Ada\ 
>>  -LC:\GNAT\lib\win32\ -LC:\Program
>
> look here --------------------------^
>
>> Files\XMLBooster\ada" -LC:\GNAT\lib\gcc-lib\pentiummingw32msv\2.8.1\adalib\ 
>> C:\GNAT\lib\gcc-lib\pentium-mingw32msv\2.8.1\adalib\libgnat.a -Wl,--stack=0x2000000 
>>  -LC:\GNAT\lib\gcc-lib\pentium-mingw32msv\2.8.1 -LC:\GNAT\lib -LC:\GNAT\lib 
>> b~text_io_example.o 
>> ./text_io_example.o -lmingw32 -lgcc -lmoldname -lmsvcrt -lkernel32 -ladvapi32
>>  -lshell32 -lmingw32 -lgcc -lmoldname -lmsvcrt
>> ld: unrecognized option
>
> GNAT does not like long file names with spaces. 2 solutions:
> - find a way to specify a shot path, eg. C:\Progra~1\XMLBoo~1\ada,
> - find a way to specify arguments with double quotes, although i'm not 
> sure GNAT will like this.
>
> -- 
> rien
> 





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

end of thread, other threads:[~2004-11-26 21:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-26 18:18 Problem with GNAT linking Daniel W
2004-11-26 21:24 ` Adrien Plisson
2004-11-26 21:41   ` Daniel W

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