rns*_*nso 2 c++ extern vala vapi
我想使用vega库来处理 dicom 文件。其网站的示例代码如下:
#include <string>
#include "vega/dictionary/dictionary.h"
#include "vega/dicom/file.h"
int main() {
// Set the dictionary file
vega::dictionary::Dictionary::set_dictionary("/path/to/dictionary/dictionary.txt");
// Read the DICOM file in
const std::string file_name = "/path/to/dicom/file/dicom.dcm";
vega::dicom::File file(file_name);
// Print a human-friendly representation of the file to std::cout
vega::Formatter formatter(std::cout);
file.data_set()->log(formatter);
}
Run Code Online (Sandbox Code Playgroud)
本页解释了包括 C 代码,但是 C++ 代码呢?
该官方页面指出“如果该库是用C++编写的,则无法将其绑定到Vala,除非有C++库的单独C绑定(例如,LLVM)。”。因此,在我看来,我不能使用 vega 库。我对么?
编辑:另外,valabind / valabind-cc与swig有帮助吗?