getopt.h missing binaryoperator before token

  • SocketMouth

    getopt.hmissing binary operator before token "("

    • SocketMouth

      Well that was a retarted post. Anyways...

      After ./configure runs successfully I try to make and this is where my problem is.

      $ sudo make
      make  all-recursive
      make[1]: Entering directory `/home/lithi/shoutcast/binaries/icegenerator-0.5.5-pre2'
      Making all in src
      make[2]: Entering directory `/home/lithi/shoutcast/binaries/icegenerator-0.5.5-pre2/src'
      if g++ -DHAVE_CONFIG_H -I. -I. -I..     -ansi -pedantic -pipe -Wall -O3 -pthread -I/usr/local/include -MT main.o -MD -MP -MF ".deps/main.Tpo" -c -o main.o main.cpp; \ then mv -f ".deps/main.Tpo" ".deps/main.Po"; else rm -f ".deps/main.Tpo"; exit 1; fi
      In file included from main.cpp:104:
      /usr/include/getopt.h:38:43: missing binary operator before token "("
      make[2]: *** [main.o] Error 1
      make[2]: Leaving directory `/home/lithi/shoutcast/binaries/icegenerator-0.5.5-pre2/src'
      make[1]: *** [all-recursive] Error 1
      make[1]: Leaving directory `/home/lithi/shoutcast/binaries/icegenerator-0.5.5-pre2'
      make: *** [all] Error 2

    • Please, try add this row:

      #define __THROW

      (read careful! There're two underscores before THROW!!)

      before line 103 in file main.cpp.

      Your file will be like that:

      #define __THROW

      #ifdef HAVE_GETOPT_H
        #include <getopt.h>

      Some platforms have a buggy getopt.h, that requires that conditional.

      Let me know is something goes wrong.

    • SocketMouth

      Thanks Tony Sin,

      The #define __THROW worked like a charm.

      After compiling I got that cannot open shared object file error. I then edited /etc/ and added the line /usr/local/lib then I ran ldconfig as root and icegenerator now runs without error.

      • Glad to know that.

        Relative linking of will be fixed in next release of IceG, so patching will be no more requested.