Skip to content

C-staticlib does not contain static ort-libs anymore  #214

@steckes

Description

@steckes

Hey!
The project is really great and using the static libs by default makes it so much nicer to use onnx runtime!

I wanted to give one of our models to a client that needs a C-Interface.
I can create a static (.a) library out of the project with crate-type = ["staticlib"].
When trying to build a C++ project linking to this library it does not find the references to ort functions. So it seems like the static library does not get re-exported into the .a file.
I know that I can link in the C++ project again to the static library, but do you know of a solution how rust can export the library into the .a?

Platform: Linux 6.9.5-arch1-1, x86_64
ORT-version: ort = { version = "2.0.0-rc.2", features = ["ndarray", "download-binaries"] }

Best,
Stephan

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions