Skip to content

pygccxml on windows, include errors #95

Open
@ValentinSiegert

Description

@ValentinSiegert

hi,

I tried to parse a cpp file with pygccxml on windows.

I used this from the tutorial:

xml_generator_config = parser.xml_generator_configuration_t(
     xml_generator_path="<locationPrefix>\\castxml\\bin\\castxml.exe",
     xml_generator="castxml",
     compiler_path="<locationPrefix>\\llvm\\bin\\clang-cpp.exe")

The locationPrefix is the directory of the builded CastXML Superbuild.

I also tried to use the Visual Studio cl.exe at Microsoft Visual Studio 14.0\\VC\\bin\\cl.exe

Both returned me this error:

temp/hello.cpp:1:10: fatal error: 'iostream' file not found
#include <iostream>
         ^~~~~~~~~~
1 error generated.

And yes I included the std namespace.
Running CastXML via cmd returns a nicely XML after parsing the hello.cpp.
So the C++ file is not the problem.

My suggestion is that pygccxml is anywhere losing the include paths of standard libs by starting the compiler via CastXML.
See also here https://social.msdn.microsoft.com/Forums/en-US/7f694e5a-8796-4d67-8ebe-e7936fc8dab6/cl-command-cannot-open-include-file?forum=Vsexpressvc

Am I doing wrong anywhere?
Or does anyone know how to fix this?

I would love to use pygccxml and not parse the XML of CastXML on my own.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions