[GCC-XML] /MD switch in msvc71. Any MFC patch?

László Blum laszlo.blum at blumsoft.com
Tue Sep 6 06:23:17 EDT 2005


Compiling my MFC application with gccxml I had to have the /MD
(multithreaded DLL) flag with msvc71.
How can I do it?
The question sounds trivial and I tried it according to the doc.
The GCCXML_CXXFLAGS=" /MD" or GCCXML_CXXFLAGS=" -MD" or GCCXML_USER_FLAGS="
/MD" has no effect.

For GCCXML_USER_FLAGS=" -MD" it complains for an extra filename after the
flag.

The vc71 patch seems to be OK.

GCC-XML version 0.6.0
Configuration settings:
  GCCXML_CONFIG="C:/Program Files/GCC_XML/bin/gccxml_config"
  GCCXML_COMPILER="msvc71"
  GCCXML_CXXFLAGS=" -MD"
  GCCXML_EXECUTABLE="C:/Program Files/GCC_XML/bin/gccxml_cc1plus.exe"
  GCCXML_CPP="C:/Program Files/GCC_XML/bin/gccxml_cc1plus.exe"
  GCCXML_FLAGS="-D__stdcall=__attribute__((__stdcall__)) -D__cdecl=__attribu
te__
((__cdecl__)) -D__fastcall=__attribute__((__fastcall__)) -D_stdcall=__attrib
ute_
_((__stdcall__)) -D_cdecl=__attribute__((__cdecl__)) -D_fastcall=__attribute
__((
__fastcall__)) -D__declspec(x)=__attribute__((x)) -D__cplusplus -D_inline=in
line
 -D__forceinline=__inline -D_MSC_VER=1310 -D_MSC_EXTENSIONS -D_WIN32 -D_M_IX
86 -
D_WCHAR_T_DEFINED -DPASCAL= -DRPC_ENTRY= -DSHSTDAPI=HRESULT -D_INTEGRAL_MAX_
BITS
=64 -D__uuidof(x)=IID() -DSHSTDAPI_(x)=x -D__w64= -D__int64=long
long -iwrapperC
:/Program Files/GCC_XML/share/gccxml-0.6/Vc71/Include -iwrapperC:/Program
Files/
GCC_XML/share/gccxml-0.6/Vc71/PlatformSDK -IC:/Program Files/Microsoft
Visual St
udio .NET 2003/Vc7/Include -IC:/Program Files/Microsoft Visual Studio .NET
2003/
Vc7/PlatformSDK/Include "
  GCCXML_USER_FLAGS=" -MD"
  GCCXML_ROOT="C:/Program Files/GCC_XML/share/gccxml-0.6"

I checked that this config was used.
Any help what did I make wrong?

I need the _AFXDLL define that requires the above switch.
I included the MFC include path by hand.
I got a plenty of errors like this:

C:/Program Files/Microsoft Visual Studio .NET
2003/Vc7/atlmfc/include/atlalloc.h
:218: error: syntax
   error before `...' token
C:/Program Files/Microsoft Visual Studio .NET
2003/Vc7/atlmfc/include/atlalloc.h
:242: error: syntax
   error before `...' token
C:/Program Files/Microsoft Visual Studio .NET
2003/Vc7/atlmfc/include/atlalloc.h
:247: error: syntax
   error before `...' token
C:/Program Files/Microsoft Visual Studio .NET
2003/Vc7/atlmfc/include/atlalloc.h
: In
   function `bool ATL::_ATL_SAFE_ALLOCA_IMPL::_AtlVerifyStackAvailable(long
   unsigned int)':
C:/Program Files/Microsoft Visual Studio .NET
2003/Vc7/atlmfc/include/atlalloc.h
:335: error: `


I guess these are the parts I have to patch manually...
Is there any patch for MFC files?
I am very excited on using the product!
Unfortunatelly, I stucked so bad...

Laszlo






More information about the gccxml mailing list