Skip to content

Make c_api_example compatible with MSVC clang compiler  #645

@TyBalduf

Description

@TyBalduf

Is your feature request related to a problem? Please describe.
I have been working to compile xTB on a Windows machine in the MingW64 environment. Using the ifort and MSVC cl compilers, I can get it 99% of the way there, but it fails to compile test/api/c_api_example.c due to issues with how the MSVC cl compiler treats const expressions. If I remove this from the build, I can run xTB just fine and I expect (though I'm still trying to test this) the c-api should still work, just not the way this example is formulated.

Describe the solution you'd like
If possible, I'd like to see the example revised to be compatible with the MSVC cl compiler.

Describe alternatives you've considered
Alternatively, just having the option to remove this from the build without manually removing instances of it from the ninja.build file would be useful.

If possible state how you can assist in providing data or code to to implement the feature
I know you mostly only work with Windows builds through the CI, so I (or someone else who comes along and finds the issue worthwhile) could draft a compatible version of c_api_example.c

Metadata

Metadata

Assignees

No one assigned

    Labels

    platform: WindowsRelated to using this project on Windows

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions