Web lists-archives.com

[Mingw-users] Problem finding a -std switch for c++ that works with all modules.

Hi all,

I am trying to build PyMol in mingw.  Previously that package used gcc 
to compile and it was pretty straightforward.  Now they have converted 
to c++ and use "c++.exe" to compile.  I'm having a devil of a time 
finding a -std value that works for all the modules.  On linux they use 
std=c++0x.  However on Windows that caused some problem (which I cannot 
recall at this point) and I switched over to using std=gnu++11 which 
went much farther.  Farther, but not to the end of the build, because 
for instance:

-Iov/src -Ilayer0 -Ilayer1 -Ilayer2 -Ilayer3 -Ilayer4 -Ilayer5 
-Imodules/cealign/src -Ibuild/generated -Icontrib/uiuc/plugins/include 
-Icontrib/uiuc/plugins/molfile_plugin/src -I/c/progs/mingw/include 
-I/c/progs/mingw/include/freetype2 -I/c/progs/Python27/include 
-I/c/progs/Python27/PC -c layer0/Feedback.cpp -o 
build/temp.win32-2.7/Release/layer0/feedback.o -Wno-write-strings 
-Wno-unused-function -Wno-char-subscripts -std=gnu++11
In file included from c:\progs\mingw\include\objbase.h:73:0,
                  from c:\progs\mingw\include\ole2.h:9,
                  from c:\progs\mingw\include\windows.h:114,
                  from layer0/os_proprietary.h:76,
                  from layer0/os_gl.h:5,
                  from layer1/Ortho.h:28,
                  from layer0/Feedback.cpp:23:
c:\progs\mingw\include\objidl.h:531:37: error: macro "Alloc" requires 2 
arguments, but only 1 given
c:\progs\mingw\include\objidl.h:532:45: error: macro "Realloc" requires 
3 arguments, but only 2 given
   STDMETHOD_(void*,Realloc)(THIS_ void*,ULONG) PURE;
In file included from c:\progs\mingw\include\rpcdce.h:10:0,
                  from c:\progs\mingw\include\rpc.h:40,
                  from c:\progs\mingw\include\windows.h:82,
                  from layer0/os_proprietary.h:76,
                  from layer0/os_gl.h:5,
                  from layer1/Ortho.h:28,
                  from layer0/Feedback.cpp:23:
c:\progs\mingw\include\objidl.h:531:39: error: 'Alloc' declared as a 
'virtual' field
c:\progs\mingw\include\objidl.h:532:47: error: 'Realloc' declared as a 
'virtual' field
   STDMETHOD_(void*,Realloc)(THIS_ void*,ULONG) PURE;

but do it with a different -std:

-DDESRES_WIN32 -DIS_LE -Iov/src -Ilayer0 -Ilayer
1 -Ilayer2 -Ilayer3 -Ilayer4 -Ilayer5 -Imodules/cealign/src 
-Ibuild/generated -Icontrib/uiuc/plugins/include -Icon
trib/uiuc/plugins/molfile_plugin/src -I/c/progs/mingw/include 
-I/c/progs/mingw/include/freetype2 -I/c/progs/Python
27/include -I/c/progs/Python27/PC -c layer0/Feedback.cpp -o 
build/temp.win32-2.7/Release/layer0/feedback.o -Wno-wr
ite-strings -Wno-unused-function -Wno-char-subscripts -std=c++0x

(clean compile).

c++ in mingw is 4.9.3 and in ubuntu it is 4.8.4, both 32 bits.

It would help if I understood why this particular module fails in mingw 
for one std but not the other.  Can somebody please enlighten me?


David Mathog
Manager, Sequence Analysis Facility, Biology Division, Caltech

What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
MinGW-users mailing list

This list observes the Etiquette found at 
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

You may change your MinGW Account Options or unsubscribe at:
Also: mailto:mingw-users-request@xxxxxxxxxxxxxxxxxxxxx?subject=unsubscribe