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

#14 extern "C" compiler error

open
nobody
None
5
2007-02-10
2007-02-10
Peter Kuemmel
No

wordrec/tface.cpp:

#ifdef __UNIX__
#include <unistd.h>
#endif

this system header moves some symbols into

extern "C" {
...
}

therefore the compiler error

../cutil/globals.h:46: error: previous declaration of ‘int optind’ with ‘C++’ linkage
../ccutil/getopt.h:23: error: conflicts with new declaration with ‘C’ linkage
../cutil/globals.h:47: error: previous declaration of ‘char* optarg’ with ‘C++’

The attached patch fixes this and a similar problem.

Peter

Discussion

  • Peter Kuemmel
    Peter Kuemmel
    2007-02-10

    Patch against CVS

     
    Attachments