Problem in GCC online manual?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I am trying to link objects compiled with g++ to objects compiled with
gnatmake, and am encountering the traditional problems with C++ name
mangling and object linking between C (which gnatmake apparently
prefers to use) and C++ (which is what the rest of my code is written
in).

When I peruse the online GCC documentation at:

https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gnat_ugn/Linking-a-Mixed-C_002b_002b-_0026-Ada-Program.html#Linking-a-Mixed-C_002b_002b-_0026-Ada-Program

...I see this line:

$ gnatmake ada_unit -largs file1.o file2.o --LINK=g++

as an example.  When I try to use the --LINK option with the tools
that come with my Ubuntu 19, however, I see this:

jon@jon-Inspiron-15-3573:~/controlix-code/src/ghdl_grt$ gnatmake
grt-vstrings_io.adb --LINK=g++
gnatmake: invalid switch: --LINK=g++

Searching for '--LINK' in the output of 'gnatmake' with no arguments
(which shows command help) doesn't show --LINK, only:

--GNATLINK=command  Use this gnatlink command

...which I presume is not the same thing as --LINK.

This is the version info for my gnatmake:

jon@jon-Inspiron-15-3573:~/controlix-code/src/ghdl_grt$ gnatmake --version
GNATMAKE 8.3.0
Copyright (C) 1995-2018, Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

Looks like there's a bug in the manual, at least, so I report it here.
Hopefully someone here can tell me how to do this step properly, if
not I will continue to search Google....

Jon



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux