comp.lang.ada
 help / color / mirror / Atom feed
From: Jan Mulder
Subject: Re: GNAT301a, SDK & WIN32ADA problems
Date: 1996/05/06
Date: 1996-05-06T00:00:00+00:00	[thread overview]
Message-ID: <4mlnqk$rjk@altrade.nijmegen.inter.nl.net> (raw)
In-Reply-To: 4mieuhINN9sf@RA.DEPT.CS.YALE.EDU


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.





  reply	other threads:[~1996-05-06  0:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-05-04  0:00 GNAT301a, SDK & WIN32ADA problems Jan
1996-05-05  0:00 ` Tom Griest
1996-05-06  0:00   ` Jan [this message]
1996-05-08  0:00 ` Chad Bremmon
replies disabled

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