Home/Support/Support Forum/doprnt takes a variable named: __qe_snprintf
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

doprnt takes a variable named: __qe_snprintf

+1 vote
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.
asked Jun 24, 2019 in Rabbit Software by farahnak New to the Community (2 points)
edited Jun 24, 2019 by farahnak

Please log in or register to answer this question.

1 Answer

0 votes
Best answer
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: https://github.com/digidotcom/DCRabbit_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:
answered Jun 24, 2019 by TomCollins Veteran of the Digi Community (1,998 points)
selected Jun 28, 2019 by TomCollins
Thank you so Much... It worked.