Discussion:
[GCC-XML] Win7 + MinGW: "Compiler is not supported" error.
petr
2013-04-25 12:45:34 UTC
Permalink
Hello GccXml team.

I'm trying to use gccxml on Win7 with MinGW compiler, but I always end
up with this error:
------------------------------------------
E:\Projects\gccxml\bat>gccxml --gccxml-compiler "g++" --gccxml-cxxargs
"-iwrapper\"c:\Program Files (x86)\gccxml\share\gccxml-0.9\GCC\4.7\"
-Ie:\Lib\OgreSDK_vc10_v1-8-1\boost
-Ie:\Lib\OgreSDK_vc10_v1-8-1\include\OGRE"
e:\Lib\OgreSDK_vc10_v1-8-1\include\OGRE\Ogre.h -fxml
e:\projects\gccxml\ogre\Ogre.h.xml
error: could not identify compiler via -E preprocessing

m_GCCXML_COMPILER: g++
compilerName: g++
compilerID: ERROR_unsupported_compiler_in_gxConfiguration_GetCompilerId

Compiler "g++" is not supported by GCC_XML.
(gxConfiguration::FindFlags)
Could not determine GCCXML_FLAGS setting.
------------------------------------------

Since I wasn't sure if I'm specifying compiler params correctly, I also
tried it this way:
------------------------------------------
E:\Projects\gccxml\bat>gccxml --gccxml-compiler "g++"
-iwrapper"c:\Program Files (x86)\gccxml\share\gccxml-0.9\GCC\4.7"
-I"e:\Lib\OgreSDK_vc10_v1-8-1\boost"
-I"e:\Lib\OgreSDK_vc10_v1-8-1\include\OGRE"
e:\Lib\OgreSDK_vc10_v1-8-1\include
------------------------------------------
Same result.

I've built gccxml from Git source a few days ago using vc10 and CMake
2.8. In CMake, I left all values to their defaults. Then I opened
<build_dir>/gccxml.sln, chose build configuration "Release", built
BUILD_ALL project, then built INSTALL project. I've manually put gccxml
to my PATH.

Prior to building gccxml, I installed MinGW 4.7.2 using mingw-get
installer. I've manually put it in my PATH.

Following this post:
http://www.cmake.org/pipermail/gccxml/2005-May/000618.html, I tried
adding -iwrapper arg, even though I believe it's obsolete. No change.
The post also mentioned -D, but I didn't figure out what exactly to
define. I tried a few macros but no luck.

I checked that g++ alone parses the same input without problems:
------------------------------------------
E:\Projects\gccxml\bat>g++ -E -I"e:\Lib\OgreSDK_vc10_v1-8-1\boost"
e:\Lib\OgreSDK_vc10_v1-8-1\include\OGRE\Ogre.h -o
e:\projects\gccxml\ogre\gxx-E\Ogre.h
------------------------------------------
Worked fine.

Can you help me please? :)
Brad King
2013-04-25 14:13:21 UTC
Permalink
Post by petr
error: could not identify compiler via -E preprocessing
m_GCCXML_COMPILER: g++
compilerName: g++
compilerID: ERROR_unsupported_compiler_in_gxConfiguration_GetCompilerId
Something goes wrong in gxConfiguration::GetCompilerId in
GCC_XML/GXFront/gxConfiguration.cxx:

https://github.com/gccxml/gccxml/blob/1bfbbe93/GCC_XML/GXFront/gxConfiguration.cxx#L994

The method tries to run the compiler's preprocessor and detect
the compiler identification by matching a regex in the output
from preprocessing. Either something goes wrong with the
command execution or the regex is not matching this compiler's
output.

Hopefully that is enough information to get you started in
debugging it.

-Brad

Loading...