comp.lang.ada
 help / color / mirror / Atom feed
* Having trouble with gnatlink
@ 2020-11-25 23:47 Pat Van Canada
  2020-11-26  8:24 ` Simon Wright
  0 siblings, 1 reply; 3+ messages in thread
From: Pat Van Canada @ 2020-11-25 23:47 UTC (permalink / 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

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

end of thread, other threads:[~2020-11-26 13:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-25 23:47 Having trouble with gnatlink Pat Van Canada
2020-11-26  8:24 ` Simon Wright
2020-11-26 13:27   ` Pat Van Canada

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