Re: [sqlite] sqlite3_blob_read declaration
On Mon, Sep 14, 2009 at 02:21:51PM +0100, Filipe Madureira scratched on the wall: > Hi, > > I have an error for sometime compiling the latest versions of SQLite > amalgamation on eVC++ 4 SQLite cannot be compiled with a C++ compiler. You must use a C compiler. -j -- Jay A. Kreibich < J A Y @ K R E I B I.C H > "Our opponent is an alien starship packed with atomic bombs. We have a protractor." "I'll go home and see if I can scrounge up a ruler and a piece of string." --from Anathem by Neal Stephenson ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] sqlite3_blob_read declaration
Error message suggests that you're compiling C code of SQLite as C++. So the first suggestion will be - do not do that, It's not always compatible. Change settings for compilation of sqlite3.c to C language (I don't know how it's done in VC++ 4, sorry). Pavel On Mon, Sep 14, 2009 at 9:21 AM, Filipe Madureira wrote: > Hi, > > I have an error for sometime compiling the latest versions of SQLite > amalgamation on eVC++ 4 > error: "'Z' : use of class template requires template argument list" > > > The problem is in the declaration of "sqlite3_blob_read prototype". > It is declared in "sqlite3.h" and "sqlite3.c" as: > > SQLITE_API int sqlite3_blob_read(sqlite3_blob *, void *Z, int N, int > iOffset); > > > and it is implemented in "sqlite3.c" as: > > SQLITE_API int sqlite3_blob_read(sqlite3_blob *pBlob, void *z, int n, > int iOffset){ > return blobReadWrite(pBlob, z, n, iOffset, sqlite3BtreeData); > } > > > If I change the uppercase "void *Z" in the declarations to lowerase > "void *z" the compilation error disappears. > > Is this supposed to be declared like this? > The other functions declarations (for example "sqlite3_blob_write") are > all in lowercase. > > > Thanks > > Cumprimentos / Best Regards > > Filipe Madureira > - > SYSDEV, LDA - Mobile Solutions > (www.sysdevsolutions.com) > Tel: +351 234188027 > Fax: +351 234188400 > - > > > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] sqlite3_blob_read declaration
Filipe Madureira wrote: > I have an error for sometime compiling the latest versions of SQLite > amalgamation on eVC++ 4 > error: "'Z' : use of class template requires template argument list" > > > The problem is in the declaration of "sqlite3_blob_read prototype". > It is declared in "sqlite3.h" and "sqlite3.c" as: > > SQLITE_API int sqlite3_blob_read(sqlite3_blob *, void *Z, int N, int > iOffset); You have a template class Z declared in some header that you include before sqlite3.h. And your compiler seems to be buggy - parameter names shouldn't be subject to name lookup, and thus shouldn't conflict with class names. Igor Tandetnik ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] sqlite3_blob_read declaration
> And your compiler seems to be buggy BTW, Wikipedia says that VC++ 4.0 "was designed for Windows 95 and Windows NT" suggesting that it was released about 15 years ago (which definitely mean that it has buggy C++ part). I'm just curious: for what OS are you developing with this compiler now? Pavel On Mon, Sep 14, 2009 at 9:33 AM, Igor Tandetnik wrote: > Filipe Madureira wrote: >> I have an error for sometime compiling the latest versions of SQLite >> amalgamation on eVC++ 4 >> error: "'Z' : use of class template requires template argument list" >> >> >> The problem is in the declaration of "sqlite3_blob_read prototype". >> It is declared in "sqlite3.h" and "sqlite3.c" as: >> >> SQLITE_API int sqlite3_blob_read(sqlite3_blob *, void *Z, int N, int >> iOffset); > > You have a template class Z declared in some header that you include > before sqlite3.h. And your compiler seems to be buggy - parameter names > shouldn't be subject to name lookup, and thus shouldn't conflict with > class names. > > Igor Tandetnik > > > > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] sqlite3_blob_read declaration
eVC++ 4 is not the same as VC++ 4. eVC++ 4 is an embedded C/C++ compiler. http://www.microsoft.com/downloads/details.aspx?FamilyId=1DACDB3D-50D1-41B2-A107-FA75AE960856&displaylang=en RW Ron Wilson, Engineering Project Lead (o) 434.455.6453, (m) 434.851.1612, www.harris.com HARRIS CORPORATION | RF Communications Division assuredcommunications(tm) > -Original Message- > From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- > boun...@sqlite.org] On Behalf Of Pavel Ivanov > Sent: Monday, September 14, 2009 9:53 AM > To: General Discussion of SQLite Database > Subject: Re: [sqlite] sqlite3_blob_read declaration > > > > And your compiler seems to be buggy > > BTW, Wikipedia says that VC++ 4.0 "was designed for Windows 95 and > Windows NT" suggesting that it was released about 15 years ago (which > definitely mean that it has buggy C++ part). I'm just curious: for > what OS are you developing with this compiler now? > > Pavel > > On Mon, Sep 14, 2009 at 9:33 AM, Igor Tandetnik > wrote: > > Filipe Madureira wrote: > >> I have an error for sometime compiling the latest versions of SQLite > >> amalgamation on eVC++ 4 > >> error: "'Z' : use of class template requires template argument list" > >> > >> > >> The problem is in the declaration of "sqlite3_blob_read prototype". > >> It is declared in "sqlite3.h" and "sqlite3.c" as: > >> > >> SQLITE_API int sqlite3_blob_read(sqlite3_blob *, void *Z, int N, int > >> iOffset); > > > > You have a template class Z declared in some header that you include > > before sqlite3.h. And your compiler seems to be buggy - parameter > names > > shouldn't be subject to name lookup, and thus shouldn't conflict with > > class names. > > > > Igor Tandetnik > > > > > > > > ___ > > sqlite-users mailing list > > sqlite-users@sqlite.org > > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > > > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] sqlite3_blob_read declaration
> eVC++ 4 is not the same as VC++ 4. eVC++ 4 is an embedded C/C++ compiler. I do apologize. Thought that this 'e' was just a typo. The same wiki page says that eVC++ was replaced by VC++ 2005 suggesting that it's much newer compiler. And it makes more strange that it has such bug... Pavel On Mon, Sep 14, 2009 at 10:28 AM, Wilson, Ronald wrote: > eVC++ 4 is not the same as VC++ 4. eVC++ 4 is an embedded C/C++ compiler. > > http://www.microsoft.com/downloads/details.aspx?FamilyId=1DACDB3D-50D1-41B2-A107-FA75AE960856&displaylang=en > > RW > > Ron Wilson, Engineering Project Lead > (o) 434.455.6453, (m) 434.851.1612, www.harris.com > > HARRIS CORPORATION | RF Communications Division > assuredcommunications(tm) > > >> -Original Message- >> From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- >> boun...@sqlite.org] On Behalf Of Pavel Ivanov >> Sent: Monday, September 14, 2009 9:53 AM >> To: General Discussion of SQLite Database >> Subject: Re: [sqlite] sqlite3_blob_read declaration >> >> >> > And your compiler seems to be buggy >> >> BTW, Wikipedia says that VC++ 4.0 "was designed for Windows 95 and >> Windows NT" suggesting that it was released about 15 years ago (which >> definitely mean that it has buggy C++ part). I'm just curious: for >> what OS are you developing with this compiler now? >> >> Pavel >> >> On Mon, Sep 14, 2009 at 9:33 AM, Igor Tandetnik >> wrote: >> > Filipe Madureira wrote: >> >> I have an error for sometime compiling the latest versions of SQLite >> >> amalgamation on eVC++ 4 >> >> error: "'Z' : use of class template requires template argument list" >> >> >> >> >> >> The problem is in the declaration of "sqlite3_blob_read prototype". >> >> It is declared in "sqlite3.h" and "sqlite3.c" as: >> >> >> >> SQLITE_API int sqlite3_blob_read(sqlite3_blob *, void *Z, int N, int >> >> iOffset); >> > >> > You have a template class Z declared in some header that you include >> > before sqlite3.h. And your compiler seems to be buggy - parameter >> names >> > shouldn't be subject to name lookup, and thus shouldn't conflict with >> > class names. >> > >> > Igor Tandetnik >> > >> > >> > >> > ___ >> > sqlite-users mailing list >> > sqlite-users@sqlite.org >> > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users >> > >> ___ >> sqlite-users mailing list >> sqlite-users@sqlite.org >> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users