Menu

#20 Build fail under Cygwin. "previous dllimport ignored"

compilation_problem
closed-fixed
libmaa (2)
5
2012-07-22
2011-08-25
No

Under latest Cygwin 1.7:

$ ../configure

libtool: compile: gcc -c -DHAVE_CONFIG_H -Wall -Werror -g -O2 -DMAA_MAJOR=1 -DMAA_MINOR=3 -DMAA_TEENY=0 -I. -I.. ../xmalloc.c -DDLL_EXPORT -DPIC -o .libs/xmalloc.o
cc1: warnings being treated as errors
In file included from ../xmalloc.c:22:
../maaP.h:115: error: 'optind' redeclared without dllimport attribute: previous dllimport ignored
../maaP.h:116: error: 'optarg' redeclared without dllimport attribute: previous dllimport ignored

This code cause error:

/* Handle getopt correctly */
#if HAVE_GETOPT_H
# include <getopt.h>
#endif
#if !defined(HAVE_GETOPT)
extern int getopt( int, char * const *, const char * );
#endif
extern int optind;
extern char *optarg;

When I comment

/* extern int optind; */
/* extern char *optarg; */

build complete successful.

Discussion

  • Oleksandr Gavenko

    I use libmaa-1.3.0.tar.gz in order to build dictd under Cygwin.

     
  • Oleksandr Gavenko

    • summary: Build fail under Cygwin. --> Build fail under Cygwin "redeclared
     
  • Oleksandr Gavenko

    I miss:

    $ make

    command...

     
  • Oleksandr Gavenko

    • summary: Build fail under Cygwin "redeclared --> Build fail under Cygwin. "previous dllimport ignored"
     
  • Aleksey Cheusov

    Aleksey Cheusov - 2011-08-26
    • status: open --> open-accepted
     
  • Aleksey Cheusov

    Aleksey Cheusov - 2012-07-22

    I could not reproduce the problem on cygwin-1.7.1
    but I hope I've just fixed the problem in maaP.h revision 1.41.
    Thanks!

     
  • Aleksey Cheusov

    Aleksey Cheusov - 2012-07-22
    • status: open-accepted --> closed-fixed
     
MongoDB Logo MongoDB