doprnt takes a variable named: __qe_snprintf

I inherited someone else C program using Dynamic C 9.62.
In a line, it uses doprnt

doprnt(__qe_snprintf, fmt, (char *)&fmt + sizeof(fmt), &m, serbuf, &n);

when trying to compile, I get this error:

           line  578 : ERROR 4160.C       : __qe_snprintf is out of scope/ not declared.

How to fix i, how can I link against the STDIO.LIB

$ grep -r “__qe_snprintf”
Lib/STDIO.LIB:void __qe_snprintf(int c, char *buf, int *cnt, void *instanceParam)

Lib/STDIO.LIB: doprnt(__qe_snprintf, format, (char *) ((char *) &format + sizeof (format)), (void *)(&local_len), buffer, &count);

Lib/STDIO.LIB: __qe_snprintf(0, buffer, &count, (void *)(&local_len)); // Null Terminator

Thank you helping me. I need to finish this ASAP.

1 Like

You need to update your Dynamic C 9.62 installation. In the latest version of STDIO.LIB, it exposes the __qe_snprintf symbol.

I’d recommend using Git and the GitHub repository for Dynamic C 9:

With that repo, you can stay up-to-date and get fixes that have not been released as official installers.

If you don’t want to go through those steps, you will at least need to install the “Dynamic C 9.62 Library Patches” from the support page:

Thank you so Much… It worked.