Stephen Oberholtzer wrote:
> On Tue, May 27, 2008 at 3:59 PM, Richard Klein <[EMAIL PROTECTED]>
> wrote:
> 
>>> On May 26, 2008, at 3:24 PM, A. H. Ongun wrote:
>>>> Now, when I change the compiler to ppc_82xx-g++ from ppc_82xx-gcc I
>>>> get hundreds of error messages.
>>>>
>>>> I am puzzled to see why this is so.
>>> My guess would be because SQLite is written in C, not C++.
>>>
>>> D. Richard Hipp
>>> [EMAIL PROTECTED]
>> My company often needs to compile SQLite under C++, so we ran into the
>> same problem.  It's easy to get rid of the error messages:  Mostly it's
>> a matter of adding explicit typecasts, and of separating nested structs.
> 
> 
> An "extern C" wrapper doesn't work?

No, the syntax

extern "C" {
...
}

tells the C++ compiler to generate C-style linkage for all functions
declared within the curly braces, i.e. to allow the functions to be
callable from C programs.  It doesn't mean "compile everything within
the braces as if it were C".

However, you may be able to use the appropriate command-line option
for your compiler.  For example, the -xc option tells gcc to compile
the input file as C, regardless of the file's extension.

- Richard Klein

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to