comp.lang.ada
 help / color / mirror / Atom feed
From: Pat Van Canada <google@spellingbeewinnars.org>
Subject: Having trouble with gnatlink
Date: Wed, 25 Nov 2020 15:47:00 -0800 (PST)	[thread overview]
Message-ID: <9fb9610e-0b54-4645-ab4e-b4b3bf554674n@googlegroups.com> (raw)

Hi Everyone

I am fooling around a bit today. I used a null terminated record and passed it to printf in C code and now I am just fooling around with Jim Tcl.

I am having this error:
/usr/bin/ld: /usr/local/lib/libjim.a(jim.o): in function `Jim_AppendStrings':
/home/patrick/JIM-DOODLING/jim2/jimtcl/jim.c:2544: undefined reference to `__va_start'
/usr/bin/ld: /home/patrick/JIM-DOODLING/jim2/jimtcl/jim.c:2546: undefined reference to `__va_arg'
/usr/bin/ld: /usr/local/lib/libjim.a(jim.o): in function `JimRandDouble':
/home/patrick/JIM-DOODLING/jim2/jimtcl/jim.c:8155: undefined reference to `__floatundidf'
/usr/bin/ld: /usr/local/lib/libjim.a(jim.o): in function `Jim_SetResultFormatted':
/home/patrick/JIM-DOODLING/jim2/jimtcl/jim.c:15926: undefined reference to `__va_start'
/usr/bin/ld: /home/patrick/JIM-DOODLING/jim2/jimtcl/jim.c:15932: undefined reference to `__va_arg'
/usr/bin/ld: /home/patrick/JIM-DOODLING/jim2/jimtcl/jim.c:15937: undefined reference to `__va_arg'
/usr/bin/ld: /usr/local/lib/libjim.a(jim-aio.o): in function `JimAioOpenPtyCommand':
/home/patrick/JIM-DOODLING/jim2/jimtcl/jim-aio.c:2070: undefined reference to `openpty'
collect2: error: ld returned 1 exit status
gnatlink: error when calling /usr/bin/x86_64-linux-gnu-gcc-9  

Does gnatlink add libc by itself when there is C code being linked? I am assuming not but I don't know how to add it.

here is my build.sh

gcc-9 -c   call_printf_src.c  -I/usr/local/include
gcc-9 -c    pointer_test.adb c.ads
gnatlink -o pointer_test  -ljim -lm -ldl  -shared-libgcc pointer_test.ali  call_printf_src.o

I don't want to use gprbuild or anything that will hide what is happening. I want to learn a little more about compiling Ada.

Thanks for reading-Patrick

             reply	other threads:[~2020-11-25 23:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-25 23:47 Pat Van Canada [this message]
2020-11-26  8:24 ` Having trouble with gnatlink Simon Wright
2020-11-26 13:27   ` Pat Van Canada
replies disabled

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