ffi

    3熱度

    1回答

    我想通過FFI在Rust中使用「xerces-c」而沒有成功。在C++中,我會寫下面的代碼來使用它: XMLPlatformUtils::Initialize(); { XercesDOMParser domParser; ParserErrorHandler parserErrorHandler; domParser.setErrorHandler(&parse

    1熱度

    1回答

    我想寫ReasonML編譯爲這個JS: function main(example) { example.foo = function() { console.log(this) } } 這裏是我的原因: let module Example = { type t; external set_foo_method : t => (t =>

    2熱度

    2回答

    我試圖用FFI導入下面的JavaScript函數到PureScript映射0參數的JavaScript函數: function getGreeting() { return "Hi, welcome to the show." } ,但我不知道該類型應該是什麼。最近我得到的是這樣的: foreign import getGreeting :: Unit -> String 我想

    1熱度

    1回答

    我有將Prolog連接到C#的問題。 Visual Studio中給出了這樣的以下錯誤: 「類型 'System.IO.FileNotFoundException' 未處理的異常發生在SwiPlCs.dll」 ,我真的不知道如何處理這個。 我覺得從我的代碼給了路徑傳來: using System; using SbsSW.SwiPlCs; namespace ptest { cl

    3熱度

    1回答

    我將Rust的數據傳遞給C,雖然傳遞原語似乎很容易,但我有點迷失於結構中。 我有以下鏽代碼: use ::std::os::raw::*; static NAME: &[c_char] = &[65, 66, 67, 0]; #[repr(C)] pub struct MyStruct { pub x: c_int, pub y: *const c_char, }

    0熱度

    1回答

    我已經手動安裝(下載和本地安裝): 硒獨立服務器3.40 IE驅動程序服務器3.4(32位) 子進程0.7.1 當我嘗試手動安裝ffi 1.9.10我得到以下gem_make.out錯誤。互聯網安全性非常緊張,所以我無法安裝filename.gem。我必須做本地安裝。由於 current directory: C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/ffi-

    0熱度

    1回答

    ,當我試圖導入GetBinaryTypeA功能: use std::ffi::CString; use ::std::os::raw::{c_char, c_ulong}; extern { fn GetBinaryTypeA(s: *const c_char, out: *mut c_ulong) -> i32; } fn main() { let path = "absol

    1熱度

    1回答

    我試圖訪問OpenGL函數glCreateVertexArrays。考慮下面的小C++程序: #include <GL/glx.h> #include <GLFW/glfw3.h> int main() { // Init GLFW glfwInit(); // Set OpenGL Version glfwWindowHint(GLFW_CONTE

    0熱度

    1回答

    我想上一個項目,一個模塊有國外來電聯繫到一個C LIB tdsodbc使用ghci中/ stack repl,但我不斷收到 ghc: panic! (the 'impossible' happened) (GHC version 7.10.3 for x86_64-unknown-linux): Loading temp shared object failed: /tmp/g

    1熱度

    1回答

    試圖走出purescript FFI,並按照「Purescript按示例」一書中,我創建了一個JS文件,以獲得一個數組的頭: exports.head = function(arr) { return arr[0]; }; 而且在purescript我宣佈一個新的Undefined數據頭的類型簽名,以表示undefined時返回數組是空的: foreign import data