Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pygccxml on windows, include errors #95

Open
ValentinSiegert opened this issue Dec 10, 2017 · 1 comment
Open

pygccxml on windows, include errors #95

ValentinSiegert opened this issue Dec 10, 2017 · 1 comment

Comments

@ValentinSiegert
Copy link

ValentinSiegert commented Dec 10, 2017

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.

@625781186
Copy link

625781186 commented Dec 31, 2019

image
test add -I <dir>

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants