Originally posted by surfacto:
Can anyone please help me decipher this error?
I installed gnugetopt using fink and then copied getopt.h to /usr/include/getopt.h. This is what I see when I type make:
g++3 --ansi -Wall -Wnon-virtual-dtor -Wno-long-long -Wundef -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -ansi -Wcast-align -g -pedantic -o flic dispersion_set.o layer_system.o transfer_matrix.o setupfile.o fl_layer_system.o spectrum.o data_set.o interference_terms.o fl_layer_system_tools.o flic.o -lncurses -lstdc++
ld: Undefined symbols:
_getopt_long
make: *** [flic] Error 1
A previous poster said that using gnugetopt solved this problem, but it didn't seem to work for me.
The error means that the symbol _getopt_long is not in the library as it should be. It could be caused by the fact that your version of getopt is different from the one that the compiled code expects. Somewhere up your link line, one of your .o files linked against the getopt library. That's your culprit.
As to how to fix it, you need to figure out why the source thinks that symbol should be in your library but isn't.
You can use the CLI tool "nm" to list out the symbol table for a library.