From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=0.8 required=3.0 tests=BAYES_50 autolearn=ham autolearn_force=no version=3.4.5-pre1 X-Received: by 2002:ac8:4802:: with SMTP id g2mr456284qtq.235.1606348021191; Wed, 25 Nov 2020 15:47:01 -0800 (PST) X-Received: by 2002:a37:bac7:: with SMTP id k190mr588919qkf.464.1606348021019; Wed, 25 Nov 2020 15:47:01 -0800 (PST) Path: eternal-september.org!reader02.eternal-september.org!news.mixmin.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 25 Nov 2020 15:47:00 -0800 (PST) Complaints-To: groups-abuse@google.com Injection-Info: google-groups.googlegroups.com; posting-host=2607:f2c0:944c:6700:e12d:6fd5:34d3:13dc; posting-account=cWMYQAoAAADC6Q2Ml1nyYgTWH7MBkx9I NNTP-Posting-Host: 2607:f2c0:944c:6700:e12d:6fd5:34d3:13dc User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <9fb9610e-0b54-4645-ab4e-b4b3bf554674n@googlegroups.com> Subject: Having trouble with gnatlink From: Pat Van Canada Injection-Date: Wed, 25 Nov 2020 23:47:01 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader02.eternal-september.org comp.lang.ada:60618 List-Id: 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