compilation on 64bit windows 7 / mingw fails

Issue #7 new
Former user created an issue

environment: win7 64bit, mingw-32_x86_64.

the error occurs with both latest code in bitbucket as well as pip installation.

seems to be something wrong with "OBJECTID" uses?

there's someone else running into the same problem here:

http://stackoverflow.com/questions/26257315/python-monary-0-2-3-mongo-monary-driver-error-in-setup-on-windows-64bit-anac

running build_cmonary

c:\MinGW\bin\gcc.exe -DMS_WIN64 -mdll -O -Wall --std=c99 -fPIC -O2 -DNDEBUG -Imongodb -mongo-c-driver-74cc0b8/src/ -c monary/cmonary.c -o monary\cmonary.o

monary/cmonary.c:1:0: warning: -fPIC ignored for target (all code is position indepen dent) [enabled by default]

// Monary - Copyright 2011-2013 David J. C. Beach

^

monary/cmonary.c:46:20: error: conflicting types for 'OBJECTID'

typedef bson_oid_t OBJECTID;

                ^

In file included from c:\mingw\x86_64-w64-mingw32\include\minwindef.h:146:0,

             from c:\mingw\x86_64-w64-mingw32\include\windef.h:8,

             from c:\mingw\x86_64-w64-mingw32\include\windows.h:69,

             from mongodb-mongo-c-driver-74cc0b8/src/mongo.h:25,

             from monary/cmonary.c:8:

c:\mingw\x86_64-w64-mingw32\include\winnt.h:609:5: note: previous declaration of 'OBJ ECTID' was here

} OBJECTID;

 ^

monary/cmonary.c: In function 'monary_load_timestamp_value':

monary/cmonary.c:247:9: warning: dereferencing type-punned pointer will break strict- aliasing rules [-Wstrict-aliasing]

     ((UINT64*) citem->storage)[idx] = *((INT64*) &value);

     ^

monary/cmonary.c: In function 'monary_load_query':

monary/cmonary.c:519:9: warning: unused variable 'total_values' [-Wunused-variable]

 int total_values = row * coldata->num_columns;

     ^

error: command 'c:\MinGW\bin\gcc.exe' failed with exit status 1

Comments (0)

  1. Log in to comment