1
我是C++和SWIG的新手。這是我的第一個項目。Swig,Python,C++:TypeError:方法'Geodatabase_Open',參數2類型'std :: string'
我能夠使用distutils成功構建我的Python擴展。但是,當我嘗試我的對象時,我不斷收到此錯誤。
似乎有一個轉換問題從獲取python字符串並將其轉換爲std :: string。
我的工作在Windows 7中,使用Visual Studio C++ 2008速成
這是我痛飲接口文件
/* swig interface file */
%module Geodatabase
%{
#include Geodatabase_helper.h
%}
namespace FileGeodatabase {
class Geodatabase {
public:
Geodatabase();
Geodatabase(std::string p);
~Geodatabase();
void Open(std::string p);
void Close();
};
}