Re: [sqlite] Problem with including sqlite3.c into c++ project

2012-06-25 Thread Keith Medcalf
> Im using MSVS 2010 for an c++ GUI project.
> After including sqlite3.h and sqlite3.c from the amalgamation-3071200
> and with the Project Properties--> C/C++  --> Precompiled Headers -->
> Precompiled Header --> Use (/Yu)
> I get the error
> sqlite3.c : fatal error C1853: 'Debug\Contegos_UI.pch' precompiled
> header file is from a previous version of the compiler, or the
> precompiled header is C++ and you are using it from C (or vice versa)

> If I change to Precompiled Header --> Create (/Yc)
> I get the error
> sqlite3.c(136660): error C2857: '#include' statement specified with the
> /YcStdAfx.h command-line option was not found in the source file

> How can I solve this problem ?

cl /nologo /Oxity /Ob2 /GLFAy /MD sqlite3.c /Fesqlite3.dll

add defines as required or

cl /nologo /D_HAVE_SQLITE_CONFIG_H /Oxity /Ob2 /GLFAy /MD sqlite3.c 
/Fesqlite3.dll

and put your sqlite #define's in "config.h"




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


Re: [sqlite] Problem with including sqlite3.c into c++ project

2012-06-25 Thread Teg

AD> Do not use precompiled headers on sqlite3.c

This.  My Sqlite is in it's own library project so, it can have
different precompiled header settings than my other projects. About
80% of my projects use procompiled headers, the other 20 are typically
made of code like Sqlite which don't have built in support for PCH.

You can probably make it work if you really want to by including
"Stdafx.h" at the top of the amalgamation C file. You'll have to do
this every time you upgrade though.

C


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


Re: [sqlite] Problem with including sqlite3.c into c++ project

2012-06-25 Thread deltagam...@gmx.net

Am 25.06.2012 22:18, schrieb John Drescher:

On Mon, Jun 25, 2012 at 4:15 PM, deltagam...@gmx.net
 wrote:

Hello,

Im using MSVS 2010 for an c++ GUI project.
After including sqlite3.h and sqlite3.c from the amalgamation-3071200
and with the Project Properties--> C/C++  --> Precompiled Headers -->
Precompiled Header --> Use (/Yu)
I get the error
sqlite3.c : fatal error C1853: 'Debug\Contegos_UI.pch' precompiled header
file is from a previous version of the compiler, or the precompiled header
is C++ and you are using it from C (or vice versa)

This is something I see with Visual Studio from time to time (not with
sqlite but I use that with Qt):

Delete Debug\Contegos_UI.pch

and try again.

John


Hello John,
deleting the pch file did not lead to success.
In another non-GUI project , i did succeed by deleting the whole 
build-branch, nor only the pch file. And setting the Create (/Yc) option

But here it does not work.


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


Re: [sqlite] Problem with including sqlite3.c into c++ project

2012-06-25 Thread Adam DeVita
Do not use precompiled headers on sqlite3.c

On Mon, Jun 25, 2012 at 4:22 PM, Pavel Ivanov  wrote:

> On Mon, Jun 25, 2012 at 4:15 PM, deltagam...@gmx.net
>  wrote:
> > Hello,
> >
> > Im using MSVS 2010 for an c++ GUI project.
> > After including sqlite3.h and sqlite3.c from the amalgamation-3071200
> > and with the Project Properties--> C/C++  --> Precompiled Headers -->
> > Precompiled Header --> Use (/Yu)
> > I get the error
> > sqlite3.c : fatal error C1853: 'Debug\Contegos_UI.pch' precompiled header
> > file is from a previous version of the compiler, or the precompiled
> header
> > is C++ and you are using it from C (or vice versa)
> >
> > If I change to Precompiled Header --> Create (/Yc)
> > I get the error
> > sqlite3.c(136660): error C2857: '#include' statement specified with the
> > /YcStdAfx.h command-line option was not found in the source file
> >
> >
> > How can I solve this problem ?
>
> Change it to Precompiled Header --> Not Using Precompiled Headers.
> Because you won't use the same headers to compile your application and
> sqlite3.c.
>
>
> Pavel
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
VerifEye Technologies Inc.
905-948-0015x245
151 Whitehall Dr, Unit 2
Markham ON, L3R 9T1
Canada
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Problem with including sqlite3.c into c++ project

2012-06-25 Thread Pavel Ivanov
On Mon, Jun 25, 2012 at 4:15 PM, deltagam...@gmx.net
 wrote:
> Hello,
>
> Im using MSVS 2010 for an c++ GUI project.
> After including sqlite3.h and sqlite3.c from the amalgamation-3071200
> and with the Project Properties--> C/C++  --> Precompiled Headers -->
> Precompiled Header --> Use (/Yu)
> I get the error
> sqlite3.c : fatal error C1853: 'Debug\Contegos_UI.pch' precompiled header
> file is from a previous version of the compiler, or the precompiled header
> is C++ and you are using it from C (or vice versa)
>
> If I change to Precompiled Header --> Create (/Yc)
> I get the error
> sqlite3.c(136660): error C2857: '#include' statement specified with the
> /YcStdAfx.h command-line option was not found in the source file
>
>
> How can I solve this problem ?

Change it to Precompiled Header --> Not Using Precompiled Headers.
Because you won't use the same headers to compile your application and
sqlite3.c.


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


Re: [sqlite] Problem with including sqlite3.c into c++ project

2012-06-25 Thread John Drescher
On Mon, Jun 25, 2012 at 4:15 PM, deltagam...@gmx.net
 wrote:
> Hello,
>
> Im using MSVS 2010 for an c++ GUI project.
> After including sqlite3.h and sqlite3.c from the amalgamation-3071200
> and with the Project Properties--> C/C++  --> Precompiled Headers -->
> Precompiled Header --> Use (/Yu)
> I get the error
> sqlite3.c : fatal error C1853: 'Debug\Contegos_UI.pch' precompiled header
> file is from a previous version of the compiler, or the precompiled header
> is C++ and you are using it from C (or vice versa)

This is something I see with Visual Studio from time to time (not with
sqlite but I use that with Qt):

Delete Debug\Contegos_UI.pch

and try again.

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