autocxx icon indicating copy to clipboard operation
autocxx copied to clipboard

Compilation fails using char*

Open bluesilenceln opened this issue 11 months ago • 1 comments

Describe the bug error[E0599]: no function or associated item named new found for struct root::A in the current scope

To Reproduce

typedef struct A {
    char * b;
}A;
use autocxx::prelude::*;

include_cpp! {
    #include "declare.h"
    safety!(unsafe_ffi)
    generate!("A")
}

fn main() {
    let a = ffi::A::new();
}

bluesilenceln avatar Mar 21 '24 03:03 bluesilenceln