From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,5193ec9554bcce38,start X-Google-Attributes: gid103376,public From: Alejandro R. Mosteo <402450@cepsz.unizar.es> Subject: Mixing Ada & C - OFF TOPIC Date: 2000/11/18 Message-ID: #1/1 X-Deja-AN: 695098613 X-Trace: fu-berlin.de 974558162 3717494 193.152.74.154 (16 [49872]) Organization: TruliSoft Corp. Newsgroups: comp.lang.ada Date: 2000-11-18T00:00:00+00:00 List-Id: 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 ------------------------------