Skip to content

Follow-up to #59: export the new C-API functions in the Windows .def#60

Merged
timoataltavo merged 1 commit into
mainfrom
fix-windows-def-exports
Jun 14, 2026
Merged

Follow-up to #59: export the new C-API functions in the Windows .def#60
timoataltavo merged 1 commit into
mainfrom
fix-windows-def-exports

Conversation

@paul-krug

Copy link
Copy Markdown
Collaborator

Follow-up to #59, which added the new component-level C-API functions
(glottis / TDS / anatomy / geometry / TL-intermediate access).

In #59 only the four vtlGlottis* functions were added to the Windows
export table (VocalTractLabApi.def). The CMake DLL build derives
Windows exports solely from that .def (in this build C_EXPORT
expands to nothing), so the other 17 functions from #59 — although
compiled into the DLL — are not exported, and a client linking against
the DLL fails on Windows with LNK2001: unresolved external symbol
(and LNK1120) for them. macOS/Linux export everything by default,
which is why #59 looked complete there.

This PR adds the remaining 17 exports so all of #59's new API is
linkable on Windows:

  • TDS: vtlTdsSetTubeAndRun, vtlTdsSetOptions, vtlTdsResetMotion
  • Anatomy: vtlGetAnatomyParams, vtlSetAnatomyParams,
    vtlSetAnatomyFromAge, vtlSetFossaDims
  • Geometry: vtlGetSurfaceVertices, vtlGetCenterline,
    vtlGetOutlines, vtlGetCrossSections, vtlGetCuts,
    vtlGetProfiles, vtlGetTongueRibData, vtlGetTongueWidthBounds,
    vtlTractToFullTube
  • TL: vtlGetTLIntermediateValues

No code or behavior change — export-table only. MSBuild CI green
(the DLL builds and exports all 17; API tests pass).

The CMake DLL build derives Windows exports solely from
VocalTractLabApi.def (C_EXPORT expands to nothing in that build), so
only functions listed there are exported and importable. The glottis
functions were added previously; this adds the remaining 17 (TDS,
anatomy, geometry/visualization, and TL-intermediate accessors) so a
cython/ctypes consumer can link them. Without this, linking a client
against the DLL fails with LNK2001 unresolved external for these
symbols on Windows; macOS/Linux export them by default and were
unaffected.
@paul-krug paul-krug requested a review from timoataltavo June 14, 2026 14:09
@timoataltavo timoataltavo merged commit df30392 into main Jun 14, 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