> Is there a working (with C++) sqlite3.h equivalent available
> somewhere, or do I need to hack on it?

A lot of people on this list including me use sqlite3.h in their C++
applications and don't see any problems compiling that as is. So you
should look at how you use that header and/or how you compile your
application. If you can narrow your non-compiling C++ file to some
short piece of code you can post it here and we'll look what's wrong
with it.


Pavel

On Tue, Jul 20, 2010 at 1:51 AM, Christopher Vance <cjsva...@gmail.com> wrote:
> I've just started playing with SQLite on MacOS, Linux and OpenBSD,
> with the intent of compiling on Windows too.
>
> Using C, I think I'm getting the hang of it. Things compile fine, and
> seem to work.
>
> I've just tried using sqlite3.h (from the 3.6.23.1 amalgamation) with
> C++ and find that it contains stuff which won't compile on C++ (I'm
> currently using Apple's g++ 4.0.1).
>
> My understanding is that declarations like
>
>   typedef struct sqlite3 sqlite3;
>
> are improper in C++, because the struct declaration already makes
> sqlite3 a typedef. The error message says
>
>  error: forward declaration of ‘struct sqlite3’
>
> Unfortunately, there are a bunch of these. Perhaps making the typedef
> name different from the struct tag is sufficient to resolve the
> problem, although I'm guessing the compiler thinks it needs to know
> not only that sqlite3 is a name for a type, but also what the contents
> of the struct are.
>
> Is there a working (with C++) sqlite3.h equivalent available
> somewhere, or do I need to hack on it?
>
> Of course, I may have missed something obvious...
>
> --
> Christopher Vance
> _______________________________________________
> 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

Reply via email to