Follow-up to #59: export the new C-API functions in the Windows .def#60
Merged
Conversation
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.
timoataltavo
approved these changes
Jun 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 Windowsexport table (
VocalTractLabApi.def). The CMake DLL build derivesWindows exports solely from that
.def(in this buildC_EXPORTexpands 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:
vtlTdsSetTubeAndRun,vtlTdsSetOptions,vtlTdsResetMotionvtlGetAnatomyParams,vtlSetAnatomyParams,vtlSetAnatomyFromAge,vtlSetFossaDimsvtlGetSurfaceVertices,vtlGetCenterline,vtlGetOutlines,vtlGetCrossSections,vtlGetCuts,vtlGetProfiles,vtlGetTongueRibData,vtlGetTongueWidthBounds,vtlTractToFullTubevtlGetTLIntermediateValuesNo code or behavior change — export-table only. MSBuild CI green
(the DLL builds and exports all 17; API tests pass).