Hi Gerry,
Gerry Blanchette wrote:
Greetings All,
In general, is passing NULL to sqlite3_bind_text() as parameter 5 valid, instead of using either SQLITE_STATIC or SQLITE_TRANSIENT? (My bind value is a heap pointer which I manage).
I ask because on SOLARIS, compiling (C++ compiler, .cpp module) when passing SQLITE_STATIC produces this rather annoying warning:
Warning (Anachronism): Formal argument 5 of type extern "C" void(*)(void*) in call to sqlite3_bind_text(sqlite3_stmt*, int, const char*, int, extern "C" void(*)(void*)) is being passed void(*)(void*).
Thanks for your help,
-- Gerry Blanchette
When you #include <sqlite3.h>, you should enclose that #include in this construct:
extern "C" { #include <sqlite3.h> }
That may solve your problem.
Likewise, the function that you pass should be declared 'extern "C"' if it's one of your own functions.
HTH
Ulrik Petersen
-- Ulrik Petersen, MA, B.Sc. University of Aalborg, Denmark Homepage: http://ulrikp.org