8000 Unable to compile · Issue #225 · lava/matplotlib-cpp · GitHub
[go: up one dir, main page]

Skip to content

Unable to compile #225

8000
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

Open
klargy opened this issue Sep 9, 2020 · 2 comments
Open

Unable to compile #225

klargy opened this issue Sep 9, 2020 · 2 comments

Comments

@klargy
Copy link
klargy commented Sep 9, 2020

I'm getting this error when I try to compile
matplotlibcpp.h:177:29: error: cannot convert ‘wchar_t**’ to ‘char**’

@PierreMezieres
Copy link

Hello,
I'm not really sure about what I'm going to say, but I think it's because you use Python2 and not Python3. When I link Python2 I have this error and not with Python3 by the way.

But nevermind, you can replace the line 177 PySys_SetArgv(argc, const_cast<wchar_t **>(argv)); by those two lines:
char ** argm = (char **)(argv); PySys_SetArgv(argc, argm);
At least, it worked for me when using Python2.

williamleong added a commit to williamleong/matplotlib-cpp that referenced this issue Oct 2, 2020
@yukkysaito
Copy link

I got the same error.
The readme example looks like it's supposed to link to python 2.7

g++ minimal.cpp -std=c++11 -I/usr/include/python2.7 -lpython2.7

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

3 participants
0