shared library -Wl command line option

Jonathan Wakely jwakely.gcc@gmail.com
Sat Dec 6 16:31:00 GMT 2014


On 6 December 2014 at 15:37, tckosvic <tcklinux@ix.netcom.com> wrote:
> GCC Group,
> I'm not a heavyweight programmer just an engineer hacker but I've found an
> issue. I am working with nasa GMAT orbital mechanics code.  Code is  *.cpp
>
> I have a line of code as below in a make file:
>
> SHARED_LIB_FLAGS = -shared -Wl
>
> I now get error message:
>
> g++: error: unrecognized command line option ‘-Wl’          That kills the
> compilation.  I've tried with both gcc48 and gcc49.
>
> This code compiled previously in older version.  I've updated my openSUSE
> several times since last compiling but it did compile with some older but
> unknown version of gcc.
> I don't know what this option does and whether I can delete it.
> I though I'd ask experienced people before I deleted it and perhaps going
> off astray.

This has nothing to do with libstdc++ so should have been asked on the
gcc-help list, not here.

-Wl is a prefix for an option, such that -Wl,xxx will pass xxx to the
linker. As such, -Wl is not a valid option on its own, and I don't
know how it ever worked. You can probably just remove it.



More information about the Libstdc++ mailing list