× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi Brian,

but I still get CZM0304 No function prototype given for 'snprintf'. Of course, the first line of the module being compiled is #include <stdio.h>.

Hmmm... I can't seem to reproduce the problem. As I test, I threw together the following program:

   #include <stdio.h>
   #define SIZE 50

   int main(void) {

       char test[SIZE];
       snprintf(test, SIZE, "Test test test test");
       printf("%s\n", test);

       return 0;
   }


I'm able to compile this with either CRTCMOD or CRTBNDC and I don't get any errors. I've tried it with LANGLVL(*ANSI) and LANGLVL(*EXTENDED) and I don't get any errors.

I'm using V5R3, but specifying TGTRLS(V5R2M0) (which uses the V5R2 compiler) doesn't seem to matter.

Have you tried it with a program this simple? Do you still have the same error? Have you checked to see if there might be invalid/undisplayable characters in your code that might've somehow got embedded in the call to the snprintf function?

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.