Skip to content

API prefix is only prepended to function declarations not file names#403

Merged
evaleev merged 5 commits intoevaleev:v2.13.xfrom
johannes-menzel:jmenzel/fix-api-prefix
Feb 24, 2026
Merged

API prefix is only prepended to function declarations not file names#403
evaleev merged 5 commits intoevaleev:v2.13.xfrom
johannes-menzel:jmenzel/fix-api-prefix

Conversation

@johannes-menzel
Copy link
Contributor

I need the API prefix feature to create a namespaced version of libint, but it is broken in the current version.
Here I identified two problems:

  1. In dg.cc the API prefix is prepended twice to the "_prereq" functions, which in turn creates a faulty include path for them.
  2. Some filenames such as GenericContract.h are unprefixed, but the libint compiler generates code that includes them with the prefix.

I fixed the first problem by applying the API prefix only at the very last step, i.e. when declaring or defining a function, and I fixed the second problem by removing the API prefix from file names, as they are not exported into the final build anyways.

Additionally, in some parts of the C++ API the unprefixed versions of function names were used, which I fixed as well; see engine.h, engine.impl.h, initialize.h

Please let me know, if there are any issues with these changes.

@evaleev evaleev force-pushed the jmenzel/fix-api-prefix branch 2 times, most recently from a8ca1a0 to 2c6dc3c Compare February 24, 2026 03:49
@evaleev evaleev force-pushed the jmenzel/fix-api-prefix branch from 2c6dc3c to 7a4540a Compare February 24, 2026 03:56
@evaleev evaleev changed the base branch from master to v2.13.x February 24, 2026 04:27
@evaleev evaleev merged commit 3ead8dd into evaleev:v2.13.x Feb 24, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants