首页 > 解决方案 > 在 Mac 上找不到“pyconfig.h”文件

问题描述

构建外壳:

g++ -I/usr/lib/python2.7 Test.cpp -lpython2.7 -lboost_python

错误信息:

In file included from Test.cpp:1:
In file included from ./Test.h:7:
In file included from /usr/local/include/boost/python.hpp:11:
In file included from /usr/local/include/boost/python/args.hpp:8:
In file included from /usr/local/include/boost/python/detail/prefix.hpp:13:
/usr/local/include/boost/python/detail/wrap_python.hpp:57:11: fatal error:
      'pyconfig.h' file not found

标签: python-2.7

解决方案


推荐阅读