Clarion build
14175
OS / architecture
Windows 10
Area
AppGen / templates
What happened
exporting a procedure FFF from a DLL. Prototype is
FFF (Ustring pStr)
Generates an error;
FFF@FRAzu is unresolved for export -
Replacing the mangle with FFF@FRAsu works, but obviously is overwritten by template LINKNAME function at next generate.
NOTE: I think the root of this issue is that unlike all other types, linkname generates different mangles for USTRING and *USTRING.
The prototype (*Ustring s) mangles to Rsu
This makes sense, and matches other string types (Rsc, Rsp, Rsa and so on).
The R indicates reference.
Unlike all the other types though for the prototype (Ustring s) it generates a different pair; just zu
It is unnecessary for it to be different. Just su would have been sufficient.
Since arrays are implicitly passed by reference, the Linker is expecting RAsu.
However, because the * is not used in the prototype LINKNAME is generating RAzu.
Hence the linker error.
Steps to reproduce
example attached.
…well, I have an example ZIP file) but the Upload button says;
“Sorry, the file you are trying to upload is not authorized (authorized extensions: jpg, jpeg, png, gif, heic, heif, webp, avif, svg, jxl).”
Let me know when this is fixed and I’ll attach the ZIP.