l...@gnu.org (Ludovic Courtès) writes: > Alex Vong <alexvong1...@gmail.com> skribis: > [...] >> >> I think you have isolated the problem! This test case does not work for >> me. >> >> >> I get the following output after building with >> (g++ -O2 -flto version.cxx): > > What if you compile with ‘gcc’ (and rename to foo.c) instead of ‘g++’? > > It might be a symbol visibility problem, or name mangling issue. > > Ludo’.
Hmm, I try to build with 'gcc -O2 -flto version.c' and './a.out --version' still fails with 'unrecognized option'. I check the symbols using 'nm' and they are not mangled. How should I check for the sign of a symbol visibility problems? Thanks, Alex