Re: [sqlite] Cross compiling sqlite3.c, anamolies.

2008-05-28 Thread John Stanton
Sqlite is a nicely structured C program which will always be better than 
C++.  Nice, clean easy to read and well documented C fits in everywhere.

Dennis Cote wrote:
> Rajesh Nair wrote:
>> Is there any program to develop sqlite in C++.
> 
> See http://www.sqlite.org/cvstrac/wiki?p=SqliteWrappers for a selection 
> of C++ wrappers.
> 
> I would suggest trying CppSQlite since it is a thin wrapper with source 
> available for free.
> 
>> I have developed a C++ wrapper for sqlite3.x but if sqlite3 itself is 
>> developed in C++ then it could be more readable.
> 
> I'm fairly certain that's not going to happen. Great effort has been put 
> into keeping SQLite's source clean C code with no C++ isms.
> 
> C is still the lingua franca of the computing world, and probably will 
> be for quite some time. The fact that SQLite is written in C, which 
> almost any language can interface with, and not C++ is a large part of 
> the reason that so many different language wrappers have been written.
> 
> Most C++ compilers can be told to compile a source file as C rather than 
> C++ to avoid extraneous errors.
> 
>> I know C, but not a hardcore C programmer.And is working with VC++ for 
>> last 6 years (MFC and ATL) .
>>
> 
> You don't need to program in C to use SQLite. There are wrappers for 
> most languages and many frameworks.
> 
> HTH
> Dennis Cote
> ___
> 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] Cross compiling sqlite3.c, anamolies.

2008-05-28 Thread Rajesh Nair
Is there any program to develop sqlite in C++.
I have developed a C++ wrapper for sqlite3.x but if sqlite3 itself is 
developed in C++ then it could be more readable.
I know C, but not a hardcore C programmer.And is working with VC++ for 
last 6 years (MFC and ATL) .


- Original Message - 
From: "D. Richard Hipp" <[EMAIL PROTECTED]>
To: "General Discussion of SQLite Database" <sqlite-users@sqlite.org>
Sent: Tuesday, May 27, 2008 1:01 AM
Subject: Re: [sqlite] Cross compiling sqlite3.c, anamolies.


>
> 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]
>
>
>
> ___
> 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] Cross compiling sqlite3.c, anamolies.

2008-05-27 Thread Richard Klein
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


Re: [sqlite] Cross compiling sqlite3.c, anamolies.

2008-05-27 Thread Stephen Oberholtzer
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?


>
>
> - Richard Klein
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
-- Stevie-O
Real programmers use COPY CON PROGRAM.EXE
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Cross compiling sqlite3.c, anamolies.

2008-05-27 Thread Richard Klein
> 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.

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