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

Subject: [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:
c++.exe -D_PYMOL_LIBPNG -D_PYMOL_INLINE -D_PYMOL_VMD_PLUGINS
-D_HAVE_LIBXML -D_PYMOL_LIBPNG -D_PYMOL_FREETYPE -D_PYMOL_INLINE
-D_PYMOL_NUMPY -D_PYMOL_OPENGL_SHADERS -DNO_MMLIBS
-D_PYMOL_CGO_DRAWARRAYS -D_PYMOL_CGO_DRAWBUFFERS -D_CGO_DRAWARRAYS
-D_PYMOL_GL_CALLLISTS -DOPENGL_ES_2 -DUSE_MINGW -DDESRES_WIN32 -DIS_LE
-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
STDMETHOD_(void*,Alloc)(THIS_ ULONG) PURE;
^
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
STDMETHOD_(void*,Alloc)(THIS_ ULONG) PURE;
^
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:
c++.exe -D_PYMOL_LIBPNG -D_PYMOL_INLINE -D_PYMOL_VMD_PLUGINS
-D_HAVE_LIBXML -D_PYMOL_LIBPNG -D_PYMOL_FREETYPE -D
_PYMOL_INLINE -D_PYMOL_NUMPY -D_PYMOL_OPENGL_SHADERS -DNO_MMLIBS
-D_PYMOL_CGO_DRAWARRAYS -D_PYMOL_CGO_DRAWBUFFERS
-D_CGO_DRAWARRAYS -D_PYMOL_GL_CALLLISTS -DOPENGL_ES_2 -DUSE_MINGW
-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?
Thanks,
David Mathog
mathog@xxxxxxxxxxx
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
MinGW-users@xxxxxxxxxxxxxxxxxxxxx
This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
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:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:mingw-users-request@xxxxxxxxxxxxxxxxxxxxx?subject=unsubscribe