Libcurl printf problem

Hi,
I am in in C11.1 and I am trying to compile a Net Talk APP with libcurl.
I have downloaded mikes stuff including printf. I can run the standalone printf tests and they run OK.
I have placed the printf.inc and inc file in accessories\libsrc\win.
I have placed the INCLUDE(‘printf.inc’),ONCE inside the Global Map

However, I get errors stating Unknown function Label for all the printf commands.
eg - printf is an Unknown Function Label as are all of these printf commands
args = printf(‘code=%s&grant_type=authorization_code&client_id=%s&client_secret=%s’, pAuthCode, pAppKey, pAppSecret)

Seems like the NT app is not seeing printf as a global so the modules cannot see it.
What am I missing to make the printf procedure available to all modules in this NT app?

Thanks,
Ron

BTW
The error is in libcurldropbox.clw which must be part of the libcurl install?
Ron

Hi Ron,

Mike’s LibCurl has a dependency on his printf code. The repository can be found here: mikeduglas/printf: Convenient string formatting.

Mark

In recent update libcurldropbox has been changed and depends on cjson now.

Hi,
Updted cjson

Problem not solved:


printf is still UNKNOWN PROCEDURE LABEL error.

The APP is not seeing printf as a Global Procedure.
Must be missing a switch somewhere?
Ron

What about the dropbox example from the package?

Hi Mike,
yes, “I have downloaded mikes stuff including printf. I can run the standalone printf tests and they run OK” - The example is Test_printF . And that does work OK.

My problem is that that example is a SINGLE CLW in a Prroject. My app is multiple procedures - and the problem is that the PROCEDURE libcurldropbox.clw does not recognize the printf from the GLOBAL MAP include and thus, the compiler flags it as an Unknown Function Label.
Ron

HI
RESOLVED!
The directions for printf stated that INCLUDE(‘printf.inc’),ONCE should be put inside the Global Map. However, the libcurldropbox.clw procedure printf was not recognized.

SOLUTION - edit the libcurldropbox.clw and place the INCLUDE(‘printf.inc’) THERE. Now it compiles correctly within the APP.
Ron

Looks like your libcurldropbox.clw is outdated or corrupted, “INCLUDE(‘printf.inc’), ONCE” line exists in the current version on github:

OT.
By the way just noticed incorrect email address mikeduglas@yandex.com
in all the headers, will fix it in libcurl (and cjson) files.