go - 由于缺少包含路径,无法构建使用 Swig 构建的 go 模块
问题描述
在我的 swig 接口文件中,我使用包括:
%{
#include "lib-cpp/types/lists/linked-list.hpp"
%}
%include "lib-cpp/types/lists/linked-list.hpp"
但是,当我运行 go install 时,我得到:
navdb_go_client_wrap.cxx:258:14: fatal error: 'lib-cpp/types/lists/linked-list.hpp' file not found
如何为 go install 指定包含目录?
解决方案
将 CPLUS_INCLUDE_PATH 导出到所需的包含路径修复了此问题。
推荐阅读
- rest - What if you make a PUT request and there is no such entity on server?
- c# - EPPlus 将逗号视为点
- c# - Wpf - 如何使图片框全视图
- python-2.7 - 如果在odoo8中的on2many中选择相同的产品,如何引发异常
- python - Use function globally or locally?
- wxpython - 如何让我的 wxPython 文本编辑器变暗?
- bootstrap-4 - What is the Bootstrap 4.0+ equivalent to ".hidden-size-down/up"
- sql - Display Serial No month wise according to number of data in table
- android - 找到了 React Native-Haste 包。但是找不到模块错误
- neo4j - Neo4j 如何在内存中缓存属性