comp.lang.ada
 help / color / mirror / Atom feed
* GNAT301a, SDK & WIN32ADA problems
@ 1996-05-04  0:00 Jan
  1996-05-05  0:00 ` Tom Griest
  1996-05-08  0:00 ` Chad Bremmon
  0 siblings, 2 replies; 4+ messages in thread
From: Jan @ 1996-05-04  0:00 UTC (permalink / raw)



hi,

I'am using the gnat301a  (fix2..fix4) and the win32ada bindings. When
building the win32ada test programs I receive the following error
message:

c:\ada\win32ada\lib\win32-assert.obj: in function
'_win32__assert__fail_assertion':
win32-assert.adb:41: undefined reference to '__assert'
c:\ada\gnat301a\gnatmake.exe: *** link failed.

I also have the SDK installed, by reading the installation notes this
should be enough.

What is wrong?

waiting for answers,
	Jan.





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

* Re: GNAT301a, SDK & WIN32ADA problems
  1996-05-04  0:00 GNAT301a, SDK & WIN32ADA problems Jan
@ 1996-05-05  0:00 ` Tom Griest
  1996-05-06  0:00   ` Jan
  1996-05-08  0:00 ` Chad Bremmon
  1 sibling, 1 reply; 4+ messages in thread
From: Tom Griest @ 1996-05-05  0:00 UTC (permalink / raw)



In article <4mgi01$3k4@altrade.nijmegen.inter.nl.net> JM writes:
>I'am using the gnat301a  (fix2..fix4) and the win32ada bindings. When
>building the win32ada test programs I receive the following error
>message:
>
>c:\ada\win32ada\lib\win32-assert.obj: in function
>'_win32__assert__fail_assertion':
>win32-assert.adb:41: undefined reference to '__assert'
>c:\ada\gnat301a\gnatmake.exe: *** link failed.
>
>I also have the SDK installed, by reading the installation notes this
>should be enough.
>
>What is wrong?

You have to link with the win32ada.lib library that is included with
the bindings.  If you are using "ld" you could add the file (with
full path) to the beginning of the libs.ld file.

-Tom




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

* Re: GNAT301a, SDK & WIN32ADA problems
  1996-05-05  0:00 ` Tom Griest
@ 1996-05-06  0:00   ` Jan
  0 siblings, 0 replies; 4+ messages in thread
From: Jan @ 1996-05-06  0:00 UTC (permalink / raw)



griest-tom@cs.yale.edu (Tom Griest) wrote:

>In article <4mgi01$3k4@altrade.nijmegen.inter.nl.net> JM writes:
>>I'am using the gnat301a  (fix2..fix4) and the win32ada bindings. When
>>building the win32ada test programs I receive the following error
>>message:
>>
>>c:\ada\win32ada\lib\win32-assert.obj: in function
>>'_win32__assert__fail_assertion':
>>win32-assert.adb:41: undefined reference to '__assert'
>>c:\ada\gnat301a\gnatmake.exe: *** link failed.
>>
>>I also have the SDK installed, by reading the installation notes this
>>should be enough.
>>
>>What is wrong?

>You have to link with the win32ada.lib library that is included with
>the bindings.  If you are using "ld" you could add the file (with
>full path) to the beginning of the libs.ld file.

>-Tom

Tom,

thanks for answering so quickly.

I have tried several places for the win32ada.lib at the libs.ld and
still no results. The mktest uses the following commands:

gcc -c test_assert.adb
gnatbl test_assert.ali ..\lib\win32ada.lib -o test_ass.exe

So I think the win32ada.lib was referenced too by the linker. I even
placed the win32ada.a at the beginning of the libs.ld file (you never
know). When trying to build the test_stdio.adb (for the experiments I
focus on test_assert.adb)  I even got more errors, meaning undefined
references to:
_fscanf
__snprintf
_sprintf
_vfprintf
__vsnprintf
__assert
_vsprintf
__iob

The gnat301a examples programs are working just fine. After installing
fix2 the cal test program worked also.

my libs.ld looks like this:

SECTIONS { .text 0x401000 : {
c:\ada\win32ada\lib\win32ada.lib
C:\ADA\gnat301a\lib\libgcc.a
C:\ADA\gnat301a\lib\libada_c.a
C:\MSTOOLS\lib\user32.lib
C:\MSTOOLS\lib\kernel32.lib
}}

and winlibs.ld looks like this:

SECTIONS { .text 0x401000 : {
C:\MSTOOLS\lib\comdlg32.lib
C:\MSTOOLS\lib\advapi32.lib
C:\MSTOOLS\lib\gdi32.lib
}}

the setpath.bat for both gnat301a and win32ada are as provided and are
run in this order.

There must be a library missing. 

Waiting for more,

Jan.





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

* Re: GNAT301a, SDK & WIN32ADA problems
  1996-05-04  0:00 GNAT301a, SDK & WIN32ADA problems Jan
  1996-05-05  0:00 ` Tom Griest
@ 1996-05-08  0:00 ` Chad Bremmon
  1 sibling, 0 replies; 4+ messages in thread
From: Chad Bremmon @ 1996-05-08  0:00 UTC (permalink / raw)



This works, however I am using the labtek installed 
version of Gnat 3.01B.

I usually didn't have any problems with the install 
and run.  Watch carefully, one of the tests is 
supposed to fail.  

Chad

libc.ld:

SECTIONS { .text 0x401000 : {
C:\gnat301b\lib\libgcc.a
C:\gnat301b\lib\libc.lib
C:\MSTOOLS\lib\user32.lib
C:\MSTOOLS\lib\kernel32.lib
}}

gnatlib.ld:

SECTIONS { .text 0x401000 : {
C:\gnat301b\lib\libgnat.a
}}




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

end of thread, other threads:[~1996-05-08  0:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-05-04  0:00 GNAT301a, SDK & WIN32ADA problems Jan
1996-05-05  0:00 ` Tom Griest
1996-05-06  0:00   ` Jan
1996-05-08  0:00 ` Chad Bremmon

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