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

[FEATURE REQUEST] Wannier library for C #435

Closed
gcistaro opened this issue Dec 15, 2022 · 2 comments
Closed

[FEATURE REQUEST] Wannier library for C #435

gcistaro opened this issue Dec 15, 2022 · 2 comments
Assignees
Milestone

Comments

@gcistaro
Copy link

Dear all,
I am trying to use the Wannier library for a C built program, but I noticed that so far the wannier library does not have a C interface.
I would like to ask if it is possible to provide a C interface to use the library directly in my program.
Thanks in advance
Giovanni

@LecrisUT
Copy link
Contributor

Unfortunately that would be a bit difficult because most tools like Swig create interfaces the other way around, making C/C++ code available to Fortran and other languages. As for Fortran's part, a custom interface layer would need to be written to translate C arrays to Fortran ones with appropriate bound checking, and even with that it is a nightmare to implement, e.g. look at how C strings are passed back-and-forth to Fortran.

@jryates
Copy link
Member

jryates commented Jan 15, 2025

Complete with #531

@jryates jryates closed this as completed Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants