warning: initializer element is not computable at load time

In C89 standard, initializer list must be compile time constants expressions, hence the warnings. However in C99 it is supported.

In C89, you can do:

struct poptOption optionsTable[2];

optionsTable[0] = {"bps", 'b', POPT_ARG_INT, &speed, 0,
  "signaling rate in bits-per-second", "BPS" };
optionsTable[1] = {"crnl", 'c', 0, 0, 'c',
  "expand cr characters to cr/lf sequences" };

Leave a Comment