Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

previous declaration of ‘char* optarg’

Help
2007-06-20
2013-04-25
  • Trying to compile SVN rev 72 on Mandriva 2007.1x64. I also get exactly the same error on PCLinuxOS 2007 x32 on another machine.

    ../cutil/globals.h:49: error: previous declaration of ‘char* optarg’ with ‘C++’ linkage
    /usr/include/getopt.h:59: error: conflicts with new declaration with ‘C’ linkage
    ../cutil/globals.h:48: error: previous declaration of ‘int optind’ with ‘C++’ linkage
    /usr/include/getopt.h:73: error: conflicts with new declaration with ‘C’ linkage
    make[3]: *** [tface.o] Error 1
    make[3]: Leaving directory `/home/simon/Source/tesseract-ocr/wordrec'
    make[2]: *** [all-recursive] Error 1
    make[2]: Leaving directory `/home/simon/Source/tesseract-ocr/wordrec'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/home/simon/Source/tesseract-ocr'
    make: *** [all] Error 2

     
    • I managed to get this to compile. Posting more info in the bugs tracker.