comp.lang.ada
 help / color / mirror / Atom feed
* Mixing Ada & C - OFF TOPIC
@ 2000-11-18  0:00 Alejandro R. Mosteo
  0 siblings, 0 replies; only message in thread
From: Alejandro R. Mosteo @ 2000-11-18  0:00 UTC (permalink / raw)


Hello, sorry for the off topic.

I have this message written for gnat chat but it is down. I know Robert 
and other people in gnat chat also read this group, so if someone wants 
to answer...

------------8<---------------------------------------------------------

Hello.

I'm  trying  to  link mixed code, C and Ada. My main procedure is in C
(platform: NT, gnat3.13p).

I  have  followed  successfully  the  instructions  on GnatUG. Here is
advised to use gnatlink for the final link-step.

But  now  I'm trying to achieve the same result using gcc as linker. I
have tried linking with -lgnat (giving the path to it), and:

1)  with  a  sample  package  with  dummy  procedure (hello world) the
executable I get is exactly the same when using gnatlink, ok.

2)  But,  when using a more complex package (with protected objects) a
lot  of  undefined  references arise. Searching for these names I have
found  that  at least some are in libgnat.a or libgnarl.a, but linking
with these does not resolve the undefined references.

Below is some output sample.

Can someone point me what I'm missing?

Thanks in advance,

A. Mosteo.

Command issued:

gcc -L$(LIBPATH) -lgnarl -lgnat main.c b_pro.c pro.o

(...)

 pro.o(.text+0x124):pro.adb: undefined reference to 
`system__soft_links__get_gnat_exception'
pro.o(.text+0x12f):pro.adb: undefined reference to 
`system__soft_links__get_current_excep'
pro.o(.text+0x140):pro.adb: undefined reference to 
`ada__exceptions__save_occurrence'
pro.o(.text+0x156):pro.adb: undefined reference to 
`ada__exceptions__reraise_occurrence_no_defer'
pro.o(.text+0x165):pro.adb: undefined reference to 
`__gnat_raise_nodefer_with_msg'
pro.o(.text+0x171):pro.adb: undefined reference to 
`system__soft_links__set_jmpbuf_address_soft'
pro.o(.text+0x189):pro.adb: undefined reference to 
`system__soft_links__set_jmpbuf_address_soft'

------------------------------
Alejandro R. Mosteo
mailto: 402450@cepsz.unizar.es
------------------------------




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-11-18  0:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-11-18  0:00 Mixing Ada & C - OFF TOPIC Alejandro R. Mosteo

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