Hi Fifi,
finally I've have updated the "Libraries collection" download in my signature with fixed versions of my "QB-StdLibs", which are now usable with QB64 x32 as well as x64. Please download this new version, unpack and make sure you move the entire "QB64Library" folder into your QB64 home folder (where qb64.exe is in).
As for your request about how to use C library functions you already got the two wiki links from TempodiBasic, which give you information about the C vs. QB64 datatypes and how to declare the functions in QB64. Ontop of this I'll give you a short example for the vsprintf() function. First note that we not use the regular printf(), fprintf() or sprintf(), as these use variable argument lists (the ... in C/C++). This is not possible in QB64, hence we use the stub functions which expect a pointer to such a list instead. These stub functions usually start with a "v", such as vprintf(), vfprintf() or vsprintf(). So here's the example for the latter one:
'function defined according to its C/C++ syntax:
'int vsprintf (char * s, const char * format, va_list arg );
buf$
= SPACE$(256) 'reserve a sufficient output buffernum&
= vsprintf&
(buf$
, "%.2f" + CHR$(0), MKD$(123.45678)) 'call function
However, as this looks very easy, it becomes more complicated as soon as you wanna format more than one number in one vsprint() call, especially if it maybe shall be INTEGER (%) or LONG (&) values, which must be (depending on x32 or x64) padded so that the next entry in the variable args list falls to a x32 (4-Byte) or x64 (8-Byte) boundary again. If you would even like to pass strings as variable arguments (for the %s format token), then the real problems start, you can not simply add the string in between your variable arguments list, but you need to place its pointer in memory into the list. As it is practically impossible to get such a memory-pointer for regular variable length strings in QB64, you can't do it. A solution would be a fixed-length string, get its reference in a _MEM variable and use mem.OFFSET, but once again depending on x32 or x64 we would need to add this pointer as either LONG (32bit) or _INTEGER64 (64bit), which gives us the next problem. You can't convert a OFFSET variable into anything else using eg. a MKL$(mem.OFFSET). Here we need to cheat QB64, I use a simple wrapper function in qbstdarg.h to do that, Steve did another interesting approch here:
http://qb64.freeforums.net/thread/52/convert-offset-integer64.
Fortunatly you don't need to deal with all this, as my "QB-StdLibs" do wrap all this internal stuff into some easy to use regular QB64 functions. In qbstdarg.bm you'll find all functions to setup variable argument lists with any number of any type values in it, qbstdio.bm gives you VPrintF, VFPrintF and VSPrintF$ (as QB64 synonymes for the same named C library functions) and if you need, you also find date/time formatting functions in qbtime.bm. So here's the code example from above modified for use of my library:
'$INCLUDE: 'QB64Library\QB-StdLibs\qbstdarg.bi'
'$INCLUDE: 'QB64Library\QB-StdLibs\qbstdio.bi'
InitArgs arg$
DoubleArg arg$, 123.456789
VPrintF "%.2f\n", arg$
FreeArgs arg$
'$INCLUDE: 'QB64Library\QB-StdLibs\qbstdarg.bm'
'$INCLUDE: 'QB64Library\QB-StdLibs\qbstdio.bm'
As you can see, you don't need to deal with DECLARE LIBRARY, providing sufficient buffers, adding CHR$(0) or extracting the actually written number of chars out of the buffer. To get a general overview and a better understanding for the dependencies I'd recommend to read through all function documentations in qbstdarg.bm, qbstdio.bm and qbtime.bm at least once and also have a look into the "example" sub-folder. If any questions remain, then don't hesitate to ask.
kind regards