Alex Vong <alexvong1...@gmail.com> skribis: > l...@gnu.org (Ludovic Courtès) writes:
[...] >> #include <argp.h> >> >> const char *argp_program_version = "foo"; >> const char *argp_program_bug_address = "f...@example.org"; >> >> static const struct argp_option options[] = >> { >> { "system", 's', "SYSTEM", 0, >> "assume SYSTEM as the current system type" }, >> { 0, 0, 0, 0, 0 } >> }; >> >> static const struct argp argp = >> { >> options, NULL, >> NULL, "doc", >> NULL, NULL, >> NULL >> }; >> >> int >> main (int argc, char *argv[]) >> { >> argp_parse (&argp, argc, argv, 0, 0, 0); >> return 0; >> } > > 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’.