Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unsupported type error on char typedef #1368

Open
fh-igd-mueller-roemer opened this issue Apr 4, 2024 · 1 comment
Open

unsupported type error on char typedef #1368

fh-igd-mueller-roemer opened this issue Apr 4, 2024 · 1 comment
Labels
bug Something isn't working need-test-case Needs a test case

Comments

@fh-igd-mueller-roemer
Copy link

fh-igd-mueller-roemer commented Apr 4, 2024

Describe the bug
When a typedef to char is used, autocxx fails with an unsupported type error.

To Reproduce

minimal.h

typedef char Standard_Character;
typedef Standard_Character * Standard_CString;

Standard_CString foo();

main.rs

use autocxx::prelude::*;

include_cpp! {
    #include "minimal.h"
    safety!(unsafe_ffi)
    generate!("foo")
}

fn main() {
    println!("Hello, world!");
}

Cargo.toml and build.rs as shown in the tutorial example.

Expected behavior
Code is generated as if char was being used.

Additional context

  • autocxx(-build) 0.26.0
  • Rust 1.77.1
  • LLVM 17.0.1
  • Visual Studio 2022 17.9.0
  • Windows 10 22H2
@adetaylor
Copy link
Collaborator

Thanks, please raise a test PR per these instructions

@adetaylor adetaylor added need-test-case Needs a test case bug Something isn't working labels Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working need-test-case Needs a test case
Projects
None yet
Development

No branches or pull requests

2 participants