Re: [sqlite] compiling with VC++

2007-02-26 Thread Dennis Jenkins

RB Smissaert wrote:

Did you make the alterations to make the dll VB compatible?

  


Nope.  C/C++ all the way.



-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] compiling with VC++

2007-02-25 Thread Martin Jenkins

RB Smissaert wrote:

OK, I understand better now. This though doesn't seem quite right to
me:

0, //sqlite3_libversion,

It looks sqlite3_libversion should be a string.


No, this is a list of function pointers. C has no notion of the *name* 
of the function, only its address. Functions are called by writing that 
address with a following "()". If you used a string containing the name 
of the function you end up trying to execute ASCII text. This is never 
going to work, though it is the basis of the buffer overflow technique 
that our friends the virus writers use. :(



Would it matter that I make it 0, rather than say ""? If it should be
an empty string then how would I do that in C?


You're confusing 0 the string terminator with 0 the NULL pointer. "" is 
an empty string but it has an address and at that address is a 0 which 
(as defined by the C standard) terminates the string. 0 in a pointer 
context tells the compiler to generate a special (NULL) pointer which 
cannot be dereferenced. The C standard defines that 0 in source code 
means NULL pointer but the implementation value is not defined. That is, 
a NULL pointer may or may not be numerically 0 in the binary object but 
usually is.


It matters because Dr Hipp has set it up that way. Wherever it is that 
these functions are dispatched, there will be a NULL pointer check. If 
the pointer is NULL then no attempt is made to run the function. As I 
said above, "" has an address so it will pass the not NULL test and an 
attempt will be made to execute whatever that string pointer points at 
(0 followed by ???) and...crash.


The real trouble with this is that execution might proceed for a while 
or even end up at a random but legitimate location within the program 
code, meaning the crash occurs some time later and far away from the 
actual bug location. M$ have something called DEP in XP which is meant 
to prevent this kind of thing, but it needs a reasonably up to date CPU.


We might be in danger of getting coughed  soon. ;)

Martin

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] compiling with VC++

2007-02-24 Thread Martin Jenkins

RB Smissaert wrote:


Due to me not knowing C I hadn't realized that this structure had to be left
intact. 


It's not a C thing as such, it's the way Dr Hipp has designed it. It's 
an interface - the third entry in the list always does the same thing 
but the function that actually runs to do that thing can be changed, 
possibly at runtime. You can disable entries by setting them to 0 (if 
the infrastructure knows about it) but if you swap list entries around 
(or delete them) things will break. That's where the VB DLL instructions 
fell down.


Martin

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] compiling with VC++

2007-02-24 Thread Martin Jenkins

RB Smissaert wrote:

Will give that a try and see if it gives any less warnings.


OK, but as Dennis suggested and Dr Hipp has confirmed this isn't the way 
to go. I was assuming the VB thing was a bit of a hack and didn't really 
read enough of the C code.


Martin

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] compiling with VC++

2007-02-24 Thread Martin Jenkins

RB Smissaert wrote:

How would I do this:
compile with -DSQLITE_OMIT_LOAD_EXTENSION=1 to leave it out.


Remember that link tab I said about earlier?

There's a C/C++ tab next to  it with a Preprocessor definitions edit 
box. I think what you want is to put ",SQLITE_OMIT_LOAD_EXTENSION=1" at 
the end of the line and rebuild your DLL. I can't say for sure because I 
don't actually use VC6++ much - I bought a 2nd hand copy a couple of 
years ago so I could compile Python/wxPython but they've moved on now.


Martin

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



RE: [sqlite] compiling with VC++

2007-02-24 Thread RB Smissaert
OK, when I do instead of commenting those lines out:

  0, //sqlite3_last_insert_rowid,

Etc. I get less warnings. Got 143 now instead 265 and no more
Warnings of the type C4028 and nil anymore in the .c file loadext.c
So, that looks much better.

Is it OK though to do this:

  0, //sqlite3_libversion,
  0, //sqlite3_libversion_number,

Or should I put something different than that zero, like an empty string?
If so how do I do that in C?

It looks then that although it compiled and worked those instructions from
Tod Tanner weren't quite right then.

RBS

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: 24 February 2007 20:06
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] compiling with VC++

"RB Smissaert" <[EMAIL PROTECTED]> wrote:
> All C4028 warnings originate from this code block:
> 
> const sqlite3_api_routines sqlite3_apis = {
[...]
>   sqlite3_busy_timeout,
>   //sqlite3_changes,
>   //sqlite3_close,
>   sqlite3_collation_needed,
>   sqlite3_collation_needed16,
> 
> Not sure it is relevant but some lines are commented out to do with making
> it VB compatible.
> 

Yes, it is relevant.  Commenting out those lines breaks the
code in a big way.

If that module is given you problems, why don't you compile
with -DSQLITE_OMIT_LOAD_EXTENSION=1 to leave it out.
--
D. Richard Hipp  <[EMAIL PROTECTED]>



-
To unsubscribe, send email to [EMAIL PROTECTED]

-




-
To unsubscribe, send email to [EMAIL PROTECTED]
-



RE: [sqlite] compiling with VC++

2007-02-24 Thread Joe Wilson
--- RB Smissaert <[EMAIL PROTECTED]> wrote:
> Could try with MinGW and MSYS and it may give less warnings, but would it
> produce a dll that is any better? If possible I want to avoid installing
> more software when I already have VC6++.

It's completely up to you. How much time do you want to spend on learning 
VC6 when you have an alternative that is known to work?

No more VC++ for me, thanks. Good luck.



 

Need Mail bonding?
Go to the Yahoo! Mail Q for great tips from Yahoo! Answers users.
http://answers.yahoo.com/dir/?link=list=396546091

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



RE: [sqlite] compiling with VC++

2007-02-24 Thread RB Smissaert
Ok, thanks. I am not a C coder and was following some (faulty?)
instructions.

How would I do this:
compile with -DSQLITE_OMIT_LOAD_EXTENSION=1 to leave it out.

I mean where do I put it?

RBS


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: 24 February 2007 20:06
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] compiling with VC++

"RB Smissaert" <[EMAIL PROTECTED]> wrote:
> All C4028 warnings originate from this code block:
> 
> const sqlite3_api_routines sqlite3_apis = {
[...]
>   sqlite3_busy_timeout,
>   //sqlite3_changes,
>   //sqlite3_close,
>   sqlite3_collation_needed,
>   sqlite3_collation_needed16,
> 
> Not sure it is relevant but some lines are commented out to do with making
> it VB compatible.
> 

Yes, it is relevant.  Commenting out those lines breaks the
code in a big way.

If that module is given you problems, why don't you compile
with -DSQLITE_OMIT_LOAD_EXTENSION=1 to leave it out.
--
D. Richard Hipp  <[EMAIL PROTECTED]>



-
To unsubscribe, send email to [EMAIL PROTECTED]

-




-
To unsubscribe, send email to [EMAIL PROTECTED]
-



RE: [sqlite] compiling with VC++

2007-02-24 Thread RB Smissaert
> You're confusing me with someone else.

No, I know it wasn't you.

Could try with MinGW and MSYS and it may give less warnings, but would it
produce a dll that is any better? If possible I want to avoid installing
more software when I already have VC6++.

RBS


-Original Message-
From: Joe Wilson [mailto:[EMAIL PROTECTED] 
Sent: 24 February 2007 19:45
To: sqlite-users@sqlite.org
Subject: RE: [sqlite] compiling with VC++

--- RB Smissaert <[EMAIL PROTECTED]> wrote:
> Downloaded it from the one you pointed to me:

You're confusing me with someone else.

Here's a way to build sqlite3.dll without Microsoft tools using the
official sources:

Grab and install MinGW and MSYS (google for it), 
download http://sqlite.org/sqlite-3.3.13.tar.gz, 
launch the bash shell and issue these commands:

 tar xzvf sqlite-3.3.13.tar.gz
 cd sqlite-3.3.13
 ./configure
 make sqlite3.dll

> 
> and a zip file - sqlite-source-3_3_13.zip - containing preprocessed source
> for Windows users at:
> 
> http://www.sqlite.org/download.html
> 
> Where else could I get it from?
> 
> RBS



 


Want to start your own business?
Learn how on Yahoo! Small Business.
http://smallbusiness.yahoo.com/r-index


-
To unsubscribe, send email to [EMAIL PROTECTED]

-




-
To unsubscribe, send email to [EMAIL PROTECTED]
-



RE: [sqlite] compiling with VC++

2007-02-24 Thread RB Smissaert
Will give that a try and see if it gives any less warnings.

RBS


-Original Message-
From: Martin Jenkins [mailto:[EMAIL PROTECTED] 
Sent: 24 February 2007 19:21
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] compiling with VC++

RB Smissaert wrote:
> Did you make the alterations to make the dll VB compatible?

I don't think Dennis was building the VB version. The lines that Todd 
says you have to comment out - did you comment them out or replace them 
with a 0?

I haven't analysed the code fully but I'm a bit suspicious about that // 
mod.

Firstly, comments in loadext.c says  new functions have to go at the end 
of the list to maintain backwards compatibility, so it sounds like the 
order is significant and 2) when sqlite3_global_recover was deprecated 
it was replaced with 0 rather than being removed completely, which also 
suggests that the order is significant.

On that basis I'd expect to see the line

  ...
  sqlite3_changes,
  ...

replaced with

  ...
  0, // sqlite3_changes,
  ...

and not

  ...
  // sqlite3_changes,
  ...

I can't comment on why Todd chose to remove those lines.

Martin


-
To unsubscribe, send email to [EMAIL PROTECTED]

-




-
To unsubscribe, send email to [EMAIL PROTECTED]
-



RE: [sqlite] compiling with VC++

2007-02-24 Thread RB Smissaert
Thanks, that sounds it might be something.

How exactly do I do this:

Instead you should disable compiling the loadable module extension by
defining SQLITE_OMIT_LOAD_EXTENSION.

RBS


-Original Message-
From: Joe Wilson [mailto:[EMAIL PROTECTED] 
Sent: 24 February 2007 19:24
To: sqlite-users@sqlite.org
Subject: RE: [sqlite] compiling with VC++

The suggested changes the web site recommends are incorrect:

 loadext.c

 Comment out the following lines is loadext.c by adding 2 back slashes
("//") to the start of the
line. This prevents errors due to our changes.

 sqlite3_changes,
 sqlite3_close,

 sqlite3_last_insert_rowid,
 sqlite3_libversion,
 sqlite3_libversion_number,

 sqlite3_open,
 sqlite3_open16, 

Instead you should disable compiling the loadable module extension by
defining SQLITE_OMIT_LOAD_EXTENSION.

--- RB Smissaert <[EMAIL PROTECTED]> wrote:

> Microsoft Visual C++ 6 Enterprise edition.
> I think it is the latest before .net came in.
> 
> I am compiling the latest 3.3.13 source as from the URL you mentioned to
me.
> Keep in mind I altered the source to make it VB compatible as in this URL:
> 
> http://www.tannertech.net/sqlite3vb/index.htm
> 
> RBS
> 
> 
> -Original Message-
> From: Martin Jenkins [mailto:[EMAIL PROTECTED] 
> Sent: 24 February 2007 18:52
> To: sqlite-users@sqlite.org
> Subject: Re: [sqlite] compiling with VC++
> 
> RB Smissaert wrote:
> > Thanks, that is very helpful and reassuring as well.
> > Will see if I can figure out then what is causing this one:
> > warning C4028, as you say that could be a typo.
> 
> I've just built 3.3.12 source with VC6 and didn't see that error. I 
> changed the warning level to 4 and got 500 warnings (signed/unsigned 
> mismatch, oddities in M$ headers, unreferenced parameter NotUsed ;)) but 
> not a C4028 in sight. VC6 is pretty old now - what version are you 
> using? And which sqlite source are you building?
> 
> Martin



 


Be a PS3 game guru.
Get your game face on with the latest PS3 news and previews at Yahoo! Games.
http://videogames.yahoo.com/platform?platform=120121


-
To unsubscribe, send email to [EMAIL PROTECTED]

-




-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] compiling with VC++

2007-02-24 Thread drh
"RB Smissaert" <[EMAIL PROTECTED]> wrote:
> All C4028 warnings originate from this code block:
> 
> const sqlite3_api_routines sqlite3_apis = {
[...]
>   sqlite3_busy_timeout,
>   //sqlite3_changes,
>   //sqlite3_close,
>   sqlite3_collation_needed,
>   sqlite3_collation_needed16,
> 
> Not sure it is relevant but some lines are commented out to do with making
> it VB compatible.
> 

Yes, it is relevant.  Commenting out those lines breaks the
code in a big way.

If that module is given you problems, why don't you compile
with -DSQLITE_OMIT_LOAD_EXTENSION=1 to leave it out.
--
D. Richard Hipp  <[EMAIL PROTECTED]>


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



RE: [sqlite] compiling with VC++

2007-02-24 Thread Joe Wilson
--- RB Smissaert <[EMAIL PROTECTED]> wrote:
> Downloaded it from the one you pointed to me:

You're confusing me with someone else.

Here's a way to build sqlite3.dll without Microsoft tools using the
official sources:

Grab and install MinGW and MSYS (google for it), 
download http://sqlite.org/sqlite-3.3.13.tar.gz, 
launch the bash shell and issue these commands:

 tar xzvf sqlite-3.3.13.tar.gz
 cd sqlite-3.3.13
 ./configure
 make sqlite3.dll

> 
> and a zip file - sqlite-source-3_3_13.zip - containing preprocessed source
> for Windows users at:
> 
> http://www.sqlite.org/download.html
> 
> Where else could I get it from?
> 
> RBS



 

Want to start your own business?
Learn how on Yahoo! Small Business.
http://smallbusiness.yahoo.com/r-index

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] compiling with VC++

2007-02-24 Thread Martin Jenkins

RB Smissaert wrote:

Microsoft Visual C++ 6 Enterprise edition.


Hmm. I'm using VC6++ Pro. I wonder if it's safe to assume the compilers 
are the same and the difference is that I don't have the Enterprisey 
middleware gubbins.



I think it is the latest before .net came in.


Dunno. I kind of lost interest in M$ around then . ;)

I'll grab the 3.3.13 code and see what happens with that. Given that 
nobody's rung me up to go for a pint yet I'll have a look at the 
TannerTech mods too, but I won't be adding to his "Sole Donation" 
because he says he lifted most of it from another site. ;)


Martin

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



RE: [sqlite] compiling with VC++

2007-02-24 Thread Joe Wilson
The suggested changes the web site recommends are incorrect:

 loadext.c

 Comment out the following lines is loadext.c by adding 2 back slashes ("//") 
to the start of the
line. This prevents errors due to our changes.

 sqlite3_changes,
 sqlite3_close,

 sqlite3_last_insert_rowid,
 sqlite3_libversion,
 sqlite3_libversion_number,

 sqlite3_open,
 sqlite3_open16, 

Instead you should disable compiling the loadable module extension by
defining SQLITE_OMIT_LOAD_EXTENSION.

--- RB Smissaert <[EMAIL PROTECTED]> wrote:

> Microsoft Visual C++ 6 Enterprise edition.
> I think it is the latest before .net came in.
> 
> I am compiling the latest 3.3.13 source as from the URL you mentioned to me.
> Keep in mind I altered the source to make it VB compatible as in this URL:
> 
> http://www.tannertech.net/sqlite3vb/index.htm
> 
> RBS
> 
> 
> -Original Message-
> From: Martin Jenkins [mailto:[EMAIL PROTECTED] 
> Sent: 24 February 2007 18:52
> To: sqlite-users@sqlite.org
> Subject: Re: [sqlite] compiling with VC++
> 
> RB Smissaert wrote:
> > Thanks, that is very helpful and reassuring as well.
> > Will see if I can figure out then what is causing this one:
> > warning C4028, as you say that could be a typo.
> 
> I've just built 3.3.12 source with VC6 and didn't see that error. I 
> changed the warning level to 4 and got 500 warnings (signed/unsigned 
> mismatch, oddities in M$ headers, unreferenced parameter NotUsed ;)) but 
> not a C4028 in sight. VC6 is pretty old now - what version are you 
> using? And which sqlite source are you building?
> 
> Martin



 

Be a PS3 game guru.
Get your game face on with the latest PS3 news and previews at Yahoo! Games.
http://videogames.yahoo.com/platform?platform=120121

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] compiling with VC++

2007-02-24 Thread Martin Jenkins

RB Smissaert wrote:

Thanks, that is very helpful and reassuring as well.
Will see if I can figure out then what is causing this one:
warning C4028, as you say that could be a typo.


I've just built 3.3.12 source with VC6 and didn't see that error. I 
changed the warning level to 4 and got 500 warnings (signed/unsigned 
mismatch, oddities in M$ headers, unreferenced parameter NotUsed ;)) but 
not a C4028 in sight. VC6 is pretty old now - what version are you 
using? And which sqlite source are you building?


Martin

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] compiling with VC++

2007-02-24 Thread Martin Jenkins

RB Smissaert wrote:

Did you make the alterations to make the dll VB compatible?


I don't think Dennis was building the VB version. The lines that Todd 
says you have to comment out - did you comment them out or replace them 
with a 0?


I haven't analysed the code fully but I'm a bit suspicious about that // 
mod.


Firstly, comments in loadext.c says  new functions have to go at the end 
of the list to maintain backwards compatibility, so it sounds like the 
order is significant and 2) when sqlite3_global_recover was deprecated 
it was replaced with 0 rather than being removed completely, which also 
suggests that the order is significant.


On that basis I'd expect to see the line

 ...
 sqlite3_changes,
 ...

replaced with

 ...
 0, // sqlite3_changes,
 ...

and not

 ...
 // sqlite3_changes,
 ...

I can't comment on why Todd chose to remove those lines.

Martin

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



RE: [sqlite] compiling with VC++

2007-02-24 Thread RB Smissaert
Downloaded it from the one you pointed to me:

and a zip file - sqlite-source-3_3_13.zip - containing preprocessed source
for Windows users at:

http://www.sqlite.org/download.html

Where else could I get it from?

RBS

-Original Message-
From: Joe Wilson [mailto:[EMAIL PROTECTED] 
Sent: 24 February 2007 19:06
To: sqlite-users@sqlite.org
Subject: RE: [sqlite] compiling with VC++

The function signatures at the lines in question look wrong to me.
Do you have the correct version of sqlite3ext.h?

--- RB Smissaert <[EMAIL PROTECTED]> wrote:
> Here examples of all 3, all from the same source file and the same code
> block:
> 
> C:\SQLite\SourceWin\loadext.c(138) : warning C4047: 'initializing' : 'int
> (__cdecl *)(struct sqlite3_stmt *,int )' differs in levels of indirection
> from 'const char *(__cdecl *)(struct sqlite3_stmt *,int )'
> 
> const sqlite3_api_routines sqlite3_apis = {
>   sqlite3_column_double,
> 
> 
> C:\SQLite\SourceWin\loadext.c(125) : warning C4113: 'int (__cdecl
*)(struct
> sqlite3 *,void *,void (__cdecl *)(void *,struct sqlite3 *,int ,const char
> *))' differs in parameter lists from 'int (__cdecl *)(struct sqlite3 *)'
> 
> const sqlite3_api_routines sqlite3_apis = {
>   sqlite3_collation_needed,
> 
> 
> C:\SQLite\SourceWin\loadext.c(208) : warning C4133: 'initializing' :
> incompatible types - from 'void *(__cdecl *)(struct sqlite3 *,void
(__cdecl
> *)(void *,int ,const char *,const char *,__int64 ),void *)' to 'char
> *(__cdecl *)(int ,char *,const char
>  *,... )'
> 
> 
> const sqlite3_api_routines sqlite3_apis = {
>   sqlite3_update_hook,
> 
> 
> This codeblock ends like this:
> 
>   /*
>   ** The original API set ends here.  All extensions can call any
>   ** of the APIs above provided that the pointer is not NULL.  But
>   ** before calling APIs that follow, extension should check the
>   ** sqlite3_libversion_number() to make sure they are dealing with
>   ** a library that is new enough to support that API.
>
*
>   */
>   sqlite3_overload_function,
> };
> 
> 
> RBS
> 
> 
> -Original Message-----
> From: Joe Wilson [mailto:[EMAIL PROTECTED] 
> Sent: 24 February 2007 17:29
> To: sqlite-users@sqlite.org
> Subject: RE: [sqlite] compiling with VC++
> 
> They're probably harmless.
> 
> Even so, can you post the file name/line of one example of each of the 
> following 3 warnings as they seem odd:
> 
> warning C4047: 'initializing' : '__int64 (__cdecl *)(struct Mem *)'
differs
> in levels of indirection from 'char *(__cdecl *)(const char *,char *)'
> 
> warning C4113: '__int64 (__cdecl *)(struct Mem *)' differs in parameter
> lists from 'void *(__cdecl *)(struct sqlite3 *,void (__cdecl *)(void *,int
> ,const char *,const char *,__int64 ),void *)'
> 
> warning C4133: 'initializing' : incompatible types - from '__int64
(__cdecl
> *)(struct sqlite3_stmt *,int )' to 'double (__cdecl *)(struct sqlite3_stmt
> *,int )'
> 
> --- RB Smissaert <[EMAIL PROTECTED]> wrote:
> > When compiling this source code I get 265 warning, which doesn't really
> > worry me that much as it all seems to be working fine, but in general
what
> > kind of warning should be taken seriously?
> > 
> > I only have 8 different types of warnings:
> > 
> > warning C4018: '!=' : signed/unsigned mismatch
> > warning C4028: formal parameter 1 different from declaration
> > warning C4047: 'initializing' : '__int64 (__cdecl *)(struct Mem *)'
> differs
> > in levels of indirection from 'char *(__cdecl *)(const char *,char *)'
> > warning C4090: 'function' : different 'const' qualifiers
> > warning C4113: '__int64 (__cdecl *)(struct Mem *)' differs in parameter
> > lists from 'void *(__cdecl *)(struct sqlite3 *,void (__cdecl *)(void
*,int
> > ,const char *,const char *,__int64 ),void *)'
> > warning C4133: 'initializing' : incompatible types - from '__int64
> (__cdecl
> > *)(struct sqlite3_stmt *,int )' to 'double (__cdecl *)(struct
sqlite3_stmt
> > *,int )'
> > warning C4244: '+=' : conversion from '__int64 ' to 'int ', possible
loss
> of
> > data
> > warning C4761: integral size mismatch in argument; conversion supplied




 


Need Mail bonding?
Go to the Yahoo! Mail Q for great tips from Yahoo! Answers users.
http://answers.yahoo.com/dir/?link=list=396546091


-
To unsubscribe, send email to [EMAIL PROTECTED]

-




-
To unsubscribe, send email to [EMAIL PROTECTED]
-



RE: [sqlite] compiling with VC++

2007-02-24 Thread RB Smissaert
Microsoft Visual C++ 6 Enterprise edition.
I think it is the latest before .net came in.

I am compiling the latest 3.3.13 source as from the URL you mentioned to me.
Keep in mind I altered the source to make it VB compatible as in this URL:

http://www.tannertech.net/sqlite3vb/index.htm

RBS


-Original Message-
From: Martin Jenkins [mailto:[EMAIL PROTECTED] 
Sent: 24 February 2007 18:52
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] compiling with VC++

RB Smissaert wrote:
> Thanks, that is very helpful and reassuring as well.
> Will see if I can figure out then what is causing this one:
> warning C4028, as you say that could be a typo.

I've just built 3.3.12 source with VC6 and didn't see that error. I 
changed the warning level to 4 and got 500 warnings (signed/unsigned 
mismatch, oddities in M$ headers, unreferenced parameter NotUsed ;)) but 
not a C4028 in sight. VC6 is pretty old now - what version are you 
using? And which sqlite source are you building?

Martin


-
To unsubscribe, send email to [EMAIL PROTECTED]

-




-
To unsubscribe, send email to [EMAIL PROTECTED]
-



RE: [sqlite] compiling with VC++

2007-02-24 Thread Joe Wilson
The function signatures at the lines in question look wrong to me.
Do you have the correct version of sqlite3ext.h?

--- RB Smissaert <[EMAIL PROTECTED]> wrote:
> Here examples of all 3, all from the same source file and the same code
> block:
> 
> C:\SQLite\SourceWin\loadext.c(138) : warning C4047: 'initializing' : 'int
> (__cdecl *)(struct sqlite3_stmt *,int )' differs in levels of indirection
> from 'const char *(__cdecl *)(struct sqlite3_stmt *,int )'
> 
> const sqlite3_api_routines sqlite3_apis = {
>   sqlite3_column_double,
> 
> 
> C:\SQLite\SourceWin\loadext.c(125) : warning C4113: 'int (__cdecl *)(struct
> sqlite3 *,void *,void (__cdecl *)(void *,struct sqlite3 *,int ,const char
> *))' differs in parameter lists from 'int (__cdecl *)(struct sqlite3 *)'
> 
> const sqlite3_api_routines sqlite3_apis = {
>   sqlite3_collation_needed,
> 
> 
> C:\SQLite\SourceWin\loadext.c(208) : warning C4133: 'initializing' :
> incompatible types - from 'void *(__cdecl *)(struct sqlite3 *,void (__cdecl
> *)(void *,int ,const char *,const char *,__int64 ),void *)' to 'char
> *(__cdecl *)(int ,char *,const char
>  *,... )'
> 
> 
> const sqlite3_api_routines sqlite3_apis = {
>   sqlite3_update_hook,
> 
> 
> This codeblock ends like this:
> 
>   /*
>   ** The original API set ends here.  All extensions can call any
>   ** of the APIs above provided that the pointer is not NULL.  But
>   ** before calling APIs that follow, extension should check the
>   ** sqlite3_libversion_number() to make sure they are dealing with
>   ** a library that is new enough to support that API.
>   *
>   */
>   sqlite3_overload_function,
> };
> 
> 
> RBS
> 
> 
> -Original Message-----
> From: Joe Wilson [mailto:[EMAIL PROTECTED] 
> Sent: 24 February 2007 17:29
> To: sqlite-users@sqlite.org
> Subject: RE: [sqlite] compiling with VC++
> 
> They're probably harmless.
> 
> Even so, can you post the file name/line of one example of each of the 
> following 3 warnings as they seem odd:
> 
> warning C4047: 'initializing' : '__int64 (__cdecl *)(struct Mem *)' differs
> in levels of indirection from 'char *(__cdecl *)(const char *,char *)'
> 
> warning C4113: '__int64 (__cdecl *)(struct Mem *)' differs in parameter
> lists from 'void *(__cdecl *)(struct sqlite3 *,void (__cdecl *)(void *,int
> ,const char *,const char *,__int64 ),void *)'
> 
> warning C4133: 'initializing' : incompatible types - from '__int64 (__cdecl
> *)(struct sqlite3_stmt *,int )' to 'double (__cdecl *)(struct sqlite3_stmt
> *,int )'
> 
> --- RB Smissaert <[EMAIL PROTECTED]> wrote:
> > When compiling this source code I get 265 warning, which doesn't really
> > worry me that much as it all seems to be working fine, but in general what
> > kind of warning should be taken seriously?
> > 
> > I only have 8 different types of warnings:
> > 
> > warning C4018: '!=' : signed/unsigned mismatch
> > warning C4028: formal parameter 1 different from declaration
> > warning C4047: 'initializing' : '__int64 (__cdecl *)(struct Mem *)'
> differs
> > in levels of indirection from 'char *(__cdecl *)(const char *,char *)'
> > warning C4090: 'function' : different 'const' qualifiers
> > warning C4113: '__int64 (__cdecl *)(struct Mem *)' differs in parameter
> > lists from 'void *(__cdecl *)(struct sqlite3 *,void (__cdecl *)(void *,int
> > ,const char *,const char *,__int64 ),void *)'
> > warning C4133: 'initializing' : incompatible types - from '__int64
> (__cdecl
> > *)(struct sqlite3_stmt *,int )' to 'double (__cdecl *)(struct sqlite3_stmt
> > *,int )'
> > warning C4244: '+=' : conversion from '__int64 ' to 'int ', possible loss
> of
> > data
> > warning C4761: integral size mismatch in argument; conversion supplied




 

Need Mail bonding?
Go to the Yahoo! Mail Q for great tips from Yahoo! Answers users.
http://answers.yahoo.com/dir/?link=list=396546091

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



RE: [sqlite] compiling with VC++

2007-02-24 Thread RB Smissaert
Did you make the alterations to make the dll VB compatible?

RBS

-Original Message-
From: Dennis Jenkins [mailto:[EMAIL PROTECTED] 
Sent: 24 February 2007 18:39
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] compiling with VC++

RB Smissaert wrote:
> Thanks, will have a look at that.
> Do you know from experience that it will compile OK with VC6++?
>
>   

I use VC 6.0 and it compiles just fine.  I did not follow the 
instructions on the web site.  I didn't even read them.  I just put all 
of the C files into a single directory (except for the tcl one and 
shell.c - leave those out) and build a static library project using the 
source files.  I did use the pre-processed C/H files from the windows 
zip file though (so I used sqlite.h, not sqlite.h.in).



-
To unsubscribe, send email to [EMAIL PROTECTED]

-




-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] compiling with VC++

2007-02-24 Thread Dennis Jenkins

RB Smissaert wrote:

Thanks, will have a look at that.
Do you know from experience that it will compile OK with VC6++?

  


I use VC 6.0 and it compiles just fine.  I did not follow the 
instructions on the web site.  I didn't even read them.  I just put all 
of the C files into a single directory (except for the tcl one and 
shell.c - leave those out) and build a static library project using the 
source files.  I did use the pre-processed C/H files from the windows 
zip file though (so I used sqlite.h, not sqlite.h.in).



-
To unsubscribe, send email to [EMAIL PROTECTED]
-



RE: [sqlite] compiling with VC++

2007-02-24 Thread RB Smissaert
Thanks, that is very helpful and reassuring as well.
Will see if I can figure out then what is causing this one:
warning C4028, as you say that could be a typo.

RBS

-Original Message-
From: Martin Jenkins [mailto:[EMAIL PROTECTED] 
Sent: 24 February 2007 18:11
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] compiling with VC++

RB Smissaert wrote:
> When compiling this source code I get 265 warning, which doesn't really
> worry me that much as it all seems to be working fine, but in general what
> kind of warning should be taken seriously?

This has come up the list before. Dr Hipp assigns a lot more weight to 
his tests passing than the complete absence of compiler warnings. This 
may sound cavalier but many of these warnings are in fact pretty benign. 
If you have a comprehensive test suite (as SQLite does) you can assume 
that these warnings *are* benign. One widely accepted reason for not 
"fixing" them is that most of the fixes (usually casts to similar type) 
just clutter up your source code and mask the intentions of the author.

> I only have 8 different types of warnings:

I won't go through them in huge detail because it's hard to say what the 
problem is without seeing the specific source lines, but generally 
compilers play safe and it's up to the author to know what he's doing. 
It can be a bit scary when you compile someone else's code for the first 
time - you see a load of warnings and think what a load of [EMAIL PROTECTED] 
but most 
of the time it's just the compiler being picky. As I said above, if you 
have a decent test suite you can relax a lot.

> warning C4018: '!=' : signed/unsigned mismatch

This is usually benign. Say you have an variable in which you store the 
unsigned return value from a library function. You know the value is 
always +ve so you make the variable unsigned. The compiler doesn't know 
the number will always be +ve but it knows signed/unsigned mismatch is a 
common source of bugs so it reports a warning. A cast would fix the 
warning but might suggest to the reader that the author wanted to force 
some kind of conversion. Or it might not.

> warning C4028: formal parameter 1 different from declaration

Without seeing the code, it's hard to say, but I'd expect this to be an 
error or a typo. Whether it matters is something else - it could be the 
signed/unsigned issue above.

> warning C4047: 'initializing' : '__int64 (__cdecl *)(struct Mem *)'
differs
> in levels of indirection from 'char *(__cdecl *)(const char *,char *)'

Hard to say without seeing the code. Indirection in C can be quite 
tricky and is a common source of bugs, but I'd be surprised to see 
anything like that in SQLite.

> warning C4090: 'function' : different 'const' qualifiers

This is common when using string library functions. They're declared 
const because, say, strlen won't alter your data and your pointers are 
not declared const because they do. Sometimes an error but usually ok.

> warning C4113: '__int64 (__cdecl *)(struct Mem *)' differs in parameter
> lists from 'void *(__cdecl *)(struct sqlite3 *,void (__cdecl *)(void *,int
> ,const char *,const char *,__int64 ),void *)'
> warning C4133: 'initializing' : incompatible types - from '__int64
(__cdecl
> *)(struct sqlite3_stmt *,int )' to 'double (__cdecl *)(struct sqlite3_stmt
> *,int )'

Hard to say without seeing the code, but it looks related to the 
indirection warning above.

> warning C4244: '+=' : conversion from '__int64 ' to 'int ', possible loss
of
> data
> warning C4761: integral size mismatch in argument; conversion supplied

Common warnings where the compiler has converted between say 16/32 bit 
ints and 32/64 bit longs. It's OK in one direction but it may not be OK 
in the other, so the compiler warns and it's up to you to check. If the 
int/long variable only holds small numbers it's not significant but the 
compiler can't tell what numbers will be stored and so it's back to you.

This explanation is brief and fairly rushed so may it not be completely 
rigorous in places but I hope it helps a bit.

Martin



-
To unsubscribe, send email to [EMAIL PROTECTED]

-




-
To unsubscribe, send email to [EMAIL PROTECTED]
-



RE: [sqlite] compiling with VC++

2007-02-24 Thread RB Smissaert
Here examples of all 3, all from the same source file and the same code
block:

C:\SQLite\SourceWin\loadext.c(138) : warning C4047: 'initializing' : 'int
(__cdecl *)(struct sqlite3_stmt *,int )' differs in levels of indirection
from 'const char *(__cdecl *)(struct sqlite3_stmt *,int )'

const sqlite3_api_routines sqlite3_apis = {
  sqlite3_column_double,


C:\SQLite\SourceWin\loadext.c(125) : warning C4113: 'int (__cdecl *)(struct
sqlite3 *,void *,void (__cdecl *)(void *,struct sqlite3 *,int ,const char
*))' differs in parameter lists from 'int (__cdecl *)(struct sqlite3 *)'

const sqlite3_api_routines sqlite3_apis = {
  sqlite3_collation_needed,


C:\SQLite\SourceWin\loadext.c(208) : warning C4133: 'initializing' :
incompatible types - from 'void *(__cdecl *)(struct sqlite3 *,void (__cdecl
*)(void *,int ,const char *,const char *,__int64 ),void *)' to 'char
*(__cdecl *)(int ,char *,const char
 *,... )'


const sqlite3_api_routines sqlite3_apis = {
  sqlite3_update_hook,


This codeblock ends like this:

  /*
  ** The original API set ends here.  All extensions can call any
  ** of the APIs above provided that the pointer is not NULL.  But
  ** before calling APIs that follow, extension should check the
  ** sqlite3_libversion_number() to make sure they are dealing with
  ** a library that is new enough to support that API.
  *
  */
  sqlite3_overload_function,
};


RBS


-Original Message-
From: Joe Wilson [mailto:[EMAIL PROTECTED] 
Sent: 24 February 2007 17:29
To: sqlite-users@sqlite.org
Subject: RE: [sqlite] compiling with VC++

They're probably harmless.

Even so, can you post the file name/line of one example of each of the 
following 3 warnings as they seem odd:

warning C4047: 'initializing' : '__int64 (__cdecl *)(struct Mem *)' differs
in levels of indirection from 'char *(__cdecl *)(const char *,char *)'

warning C4113: '__int64 (__cdecl *)(struct Mem *)' differs in parameter
lists from 'void *(__cdecl *)(struct sqlite3 *,void (__cdecl *)(void *,int
,const char *,const char *,__int64 ),void *)'

warning C4133: 'initializing' : incompatible types - from '__int64 (__cdecl
*)(struct sqlite3_stmt *,int )' to 'double (__cdecl *)(struct sqlite3_stmt
*,int )'

--- RB Smissaert <[EMAIL PROTECTED]> wrote:
> When compiling this source code I get 265 warning, which doesn't really
> worry me that much as it all seems to be working fine, but in general what
> kind of warning should be taken seriously?
> 
> I only have 8 different types of warnings:
> 
> warning C4018: '!=' : signed/unsigned mismatch
> warning C4028: formal parameter 1 different from declaration
> warning C4047: 'initializing' : '__int64 (__cdecl *)(struct Mem *)'
differs
> in levels of indirection from 'char *(__cdecl *)(const char *,char *)'
> warning C4090: 'function' : different 'const' qualifiers
> warning C4113: '__int64 (__cdecl *)(struct Mem *)' differs in parameter
> lists from 'void *(__cdecl *)(struct sqlite3 *,void (__cdecl *)(void *,int
> ,const char *,const char *,__int64 ),void *)'
> warning C4133: 'initializing' : incompatible types - from '__int64
(__cdecl
> *)(struct sqlite3_stmt *,int )' to 'double (__cdecl *)(struct sqlite3_stmt
> *,int )'
> warning C4244: '+=' : conversion from '__int64 ' to 'int ', possible loss
of
> data
> warning C4761: integral size mismatch in argument; conversion supplied



 


Looking for earth-friendly autos? 
Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center.
http://autos.yahoo.com/green_center/


-
To unsubscribe, send email to [EMAIL PROTECTED]

-




-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] compiling with VC++

2007-02-24 Thread Martin Jenkins

RB Smissaert wrote:

When compiling this source code I get 265 warning, which doesn't really
worry me that much as it all seems to be working fine, but in general what
kind of warning should be taken seriously?


This has come up the list before. Dr Hipp assigns a lot more weight to 
his tests passing than the complete absence of compiler warnings. This 
may sound cavalier but many of these warnings are in fact pretty benign. 
If you have a comprehensive test suite (as SQLite does) you can assume 
that these warnings *are* benign. One widely accepted reason for not 
"fixing" them is that most of the fixes (usually casts to similar type) 
just clutter up your source code and mask the intentions of the author.



I only have 8 different types of warnings:


I won't go through them in huge detail because it's hard to say what the 
problem is without seeing the specific source lines, but generally 
compilers play safe and it's up to the author to know what he's doing. 
It can be a bit scary when you compile someone else's code for the first 
time - you see a load of warnings and think what a load of [EMAIL PROTECTED] but most 
of the time it's just the compiler being picky. As I said above, if you 
have a decent test suite you can relax a lot.



warning C4018: '!=' : signed/unsigned mismatch


This is usually benign. Say you have an variable in which you store the 
unsigned return value from a library function. You know the value is 
always +ve so you make the variable unsigned. The compiler doesn't know 
the number will always be +ve but it knows signed/unsigned mismatch is a 
common source of bugs so it reports a warning. A cast would fix the 
warning but might suggest to the reader that the author wanted to force 
some kind of conversion. Or it might not.



warning C4028: formal parameter 1 different from declaration


Without seeing the code, it's hard to say, but I'd expect this to be an 
error or a typo. Whether it matters is something else - it could be the 
signed/unsigned issue above.



warning C4047: 'initializing' : '__int64 (__cdecl *)(struct Mem *)' differs
in levels of indirection from 'char *(__cdecl *)(const char *,char *)'


Hard to say without seeing the code. Indirection in C can be quite 
tricky and is a common source of bugs, but I'd be surprised to see 
anything like that in SQLite.



warning C4090: 'function' : different 'const' qualifiers


This is common when using string library functions. They're declared 
const because, say, strlen won't alter your data and your pointers are 
not declared const because they do. Sometimes an error but usually ok.



warning C4113: '__int64 (__cdecl *)(struct Mem *)' differs in parameter
lists from 'void *(__cdecl *)(struct sqlite3 *,void (__cdecl *)(void *,int
,const char *,const char *,__int64 ),void *)'
warning C4133: 'initializing' : incompatible types - from '__int64 (__cdecl
*)(struct sqlite3_stmt *,int )' to 'double (__cdecl *)(struct sqlite3_stmt
*,int )'


Hard to say without seeing the code, but it looks related to the 
indirection warning above.



warning C4244: '+=' : conversion from '__int64 ' to 'int ', possible loss of
data
warning C4761: integral size mismatch in argument; conversion supplied


Common warnings where the compiler has converted between say 16/32 bit 
ints and 32/64 bit longs. It's OK in one direction but it may not be OK 
in the other, so the compiler warns and it's up to you to check. If the 
int/long variable only holds small numbers it's not significant but the 
compiler can't tell what numbers will be stored and so it's back to you.


This explanation is brief and fairly rushed so may it not be completely 
rigorous in places but I hope it helps a bit.


Martin


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



RE: [sqlite] compiling with VC++

2007-02-24 Thread Joe Wilson
They're probably harmless.

Even so, can you post the file name/line of one example of each of the 
following 3 warnings as they seem odd:

warning C4047: 'initializing' : '__int64 (__cdecl *)(struct Mem *)' differs
in levels of indirection from 'char *(__cdecl *)(const char *,char *)'

warning C4113: '__int64 (__cdecl *)(struct Mem *)' differs in parameter
lists from 'void *(__cdecl *)(struct sqlite3 *,void (__cdecl *)(void *,int
,const char *,const char *,__int64 ),void *)'

warning C4133: 'initializing' : incompatible types - from '__int64 (__cdecl
*)(struct sqlite3_stmt *,int )' to 'double (__cdecl *)(struct sqlite3_stmt
*,int )'

--- RB Smissaert <[EMAIL PROTECTED]> wrote:
> When compiling this source code I get 265 warning, which doesn't really
> worry me that much as it all seems to be working fine, but in general what
> kind of warning should be taken seriously?
> 
> I only have 8 different types of warnings:
> 
> warning C4018: '!=' : signed/unsigned mismatch
> warning C4028: formal parameter 1 different from declaration
> warning C4047: 'initializing' : '__int64 (__cdecl *)(struct Mem *)' differs
> in levels of indirection from 'char *(__cdecl *)(const char *,char *)'
> warning C4090: 'function' : different 'const' qualifiers
> warning C4113: '__int64 (__cdecl *)(struct Mem *)' differs in parameter
> lists from 'void *(__cdecl *)(struct sqlite3 *,void (__cdecl *)(void *,int
> ,const char *,const char *,__int64 ),void *)'
> warning C4133: 'initializing' : incompatible types - from '__int64 (__cdecl
> *)(struct sqlite3_stmt *,int )' to 'double (__cdecl *)(struct sqlite3_stmt
> *,int )'
> warning C4244: '+=' : conversion from '__int64 ' to 'int ', possible loss of
> data
> warning C4761: integral size mismatch in argument; conversion supplied



 

Looking for earth-friendly autos? 
Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center.
http://autos.yahoo.com/green_center/

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



RE: [sqlite] compiling with VC++

2007-02-24 Thread RB Smissaert
When compiling this source code I get 265 warning, which doesn't really
worry me that much as it all seems to be working fine, but in general what
kind of warning should be taken seriously?

I only have 8 different types of warnings:

warning C4018: '!=' : signed/unsigned mismatch
warning C4028: formal parameter 1 different from declaration
warning C4047: 'initializing' : '__int64 (__cdecl *)(struct Mem *)' differs
in levels of indirection from 'char *(__cdecl *)(const char *,char *)'
warning C4090: 'function' : different 'const' qualifiers
warning C4113: '__int64 (__cdecl *)(struct Mem *)' differs in parameter
lists from 'void *(__cdecl *)(struct sqlite3 *,void (__cdecl *)(void *,int
,const char *,const char *,__int64 ),void *)'
warning C4133: 'initializing' : incompatible types - from '__int64 (__cdecl
*)(struct sqlite3_stmt *,int )' to 'double (__cdecl *)(struct sqlite3_stmt
*,int )'
warning C4244: '+=' : conversion from '__int64 ' to 'int ', possible loss of
data
warning C4761: integral size mismatch in argument; conversion supplied

RBS

-Original Message-
From: RB Smissaert [mailto:[EMAIL PROTECTED] 
Sent: 24 February 2007 16:18
To: sqlite-users@sqlite.org
Subject: RE: [sqlite] compiling with VC++

Thanks, that is it, nice and simple.

RBS

-Original Message-
From: Martin Jenkins [mailto:[EMAIL PROTECTED] 
Sent: 24 February 2007 15:40
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] compiling with VC++

RB Smissaert wrote:

> Now what do I do make it compile a dll called SQLite3VB.dll?

I think it defaults to the project name, but have a look at the Link tab 
in the Project|Settings dialog (Alt-F7) - there's an edit box titled 
"Output file name" which might do what you want.

Martin


-
To unsubscribe, send email to [EMAIL PROTECTED]

-





-
To unsubscribe, send email to [EMAIL PROTECTED]

-




-
To unsubscribe, send email to [EMAIL PROTECTED]
-



RE: [sqlite] compiling with VC++

2007-02-24 Thread RB Smissaert
Thanks, that is it, nice and simple.

RBS

-Original Message-
From: Martin Jenkins [mailto:[EMAIL PROTECTED] 
Sent: 24 February 2007 15:40
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] compiling with VC++

RB Smissaert wrote:

> Now what do I do make it compile a dll called SQLite3VB.dll?

I think it defaults to the project name, but have a look at the Link tab 
in the Project|Settings dialog (Alt-F7) - there's an edit box titled 
"Output file name" which might do what you want.

Martin


-
To unsubscribe, send email to [EMAIL PROTECTED]

-




-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] compiling with VC++

2007-02-24 Thread Martin Jenkins

RB Smissaert wrote:


Now what do I do make it compile a dll called SQLite3VB.dll?


I think it defaults to the project name, but have a look at the Link tab 
in the Project|Settings dialog (Alt-F7) - there's an edit box titled 
"Output file name" which might do what you want.


Martin

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



RE: [sqlite] compiling with VC++

2007-02-24 Thread RB Smissaert
Just one simple question:
I have a VC6++ project now that compiles a dll called SQLiteVB.dll
Now what do I do make it compile a dll called SQLite3VB.dll?
I can see no simple configuration setting for this. I could of course start
a new project, but that seems silly.
Thanks for any advice.

RBS


-Original Message-
From: RB Smissaert [mailto:[EMAIL PROTECTED] 
Sent: 24 February 2007 14:31
To: sqlite-users@sqlite.org
Subject: RE: [sqlite] compiling with VC++

Think I got this fixed now.
It simply was something I had overlooked to change:

//const char *sqlite3_libversion(void);
BSTR __stdcall sqlite3_libversion(void);

Lots of warnings (265) but no errors and a dll is produced, which I will try
now.

RBS

-Original Message-
From: RB Smissaert [mailto:[EMAIL PROTECTED] 
Sent: 24 February 2007 13:47
To: sqlite-users@sqlite.org
Subject: RE: [sqlite] compiling with VC++

OK, thanks a lot.

I think I have made a lot of progress, probably because of the different
source files you pointed me to.

I get one error though and that has to do with this bit of code:

/*
** The version of the library
*/
const char sqlite3_version[] = SQLITE_VERSION;
BSTR __stdcall sqlite3_libversion(void){ return SysAllocStringByteLen(
sqlite3_version,strlen( sqlite3_version) ); }
BSTR __stdcall sqlite3_libversion_number(void){ return
SQLITE_VERSION_NUMBER; }

The error originates from the second line of code and shows like this in the
build window:

c:\sqlite\sourcewin\main.c(33) : error C2373: 'sqlite3_libversion' :
redefinition; different type modifiers

No idea what to do about this.


RBS


-Original Message-
From: Martin Jenkins [mailto:[EMAIL PROTECTED] 
Sent: 24 February 2007 13:29
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] compiling with VC++

RB Smissaert wrote:
> Thanks, will have a look at that.
> Do you know from experience that it will compile OK with VC6++?

I'm pretty sure I've compiled it with VC6++. I've been compiling on 
Debian and Solaris machines recently and have sort of lost track of 
building stuff on Windows. I tried upgrading to the current MS compilers 
but there seemed to be so many things that I didn't know I wanted that I 
think I gave up.

I'm having the same problems with installing the software for my phone. 
Been at it a couple of hours and so far it's changed my default email 
application, my default image viewer and my MP3 player and I still can't 
access the information I wanted off my phone. First and last Windows 
Smartphone I'll buy. It's "Smart" as in "Sting" rather than "Clever".

I'm going for a cup of tea and then I'll have a look and see if I can 
find some  VC6 project files for you. If I do I'll mail them straight to 
you rather than clutter up the list. If they work I suppose they could 
be uploaded somewhere.

Martin


-
To unsubscribe, send email to [EMAIL PROTECTED]

-





-
To unsubscribe, send email to [EMAIL PROTECTED]

-





-
To unsubscribe, send email to [EMAIL PROTECTED]

-




-
To unsubscribe, send email to [EMAIL PROTECTED]
-



RE: [sqlite] compiling with VC++

2007-02-24 Thread RB Smissaert
> which I will try now

And it works fine.

So the instructions at:
http://www.tannertech.net/sqlite3vb/index.htm
are fine to compile with VC6++ if you pick the right source files:
http://www.sqlite.org/download.html

and just ignore this bit:

We need to set our Module Definition File.

* Right click your project in the Solution Explorer and select
Properties.
* Select "All Configurations" from the Configuration drop down box.
(Important!)
* Select Configuration Properties -> Linker -> Input.
* Under "Module Definition File" enter "$(InputDir)sqlite3.def" without
the quotes. It should be located in the same folder in your project as your
SQLite source files.

Quite impressive to compile a real dll (as compared to a VB ActiveX dll).

Now will need to figure out if I can get some more function available in VB
than the ones I got now:

Private Declare Sub sqlite3_open Lib "SQLiteVB.dll" _
 (ByVal FileName As String, _
ByRef handle As Long)
Private Declare Sub sqlite3_close Lib "SQLiteVB.dll" _
 (ByVal DB_Handle As Long)
Private Declare Function sqlite3_last_insert_rowid _
Lib "SQLiteVB.dll" _
 (ByVal DB_Handle As Long) As Long
Private Declare Function sqlite3_changes _
Lib "SQLiteVB.dll" _
   (ByVal DB_Handle As Long) As Long
Private Declare Function sqlite_get_table _
Lib "SQLiteVB.dll" _
 (ByVal DB_Handle As Long, _
   ByVal SQLString As String, _
 ByRef ErrStr As String) As Variant()
Private Declare Function sqlite_libversion _
 Lib "SQLiteVB.dll" () As String
Private Declare Function number_of_rows_from_last_call _
  Lib "SQLiteVB.dll" () As Long


RBS

-Original Message-
From: RB Smissaert [mailto:[EMAIL PROTECTED] 
Sent: 24 February 2007 14:31
To: sqlite-users@sqlite.org
Subject: RE: [sqlite] compiling with VC++

Think I got this fixed now.
It simply was something I had overlooked to change:

//const char *sqlite3_libversion(void);
BSTR __stdcall sqlite3_libversion(void);

Lots of warnings (265) but no errors and a dll is produced, which I will try
now.

RBS

-Original Message-
From: RB Smissaert [mailto:[EMAIL PROTECTED] 
Sent: 24 February 2007 13:47
To: sqlite-users@sqlite.org
Subject: RE: [sqlite] compiling with VC++

OK, thanks a lot.

I think I have made a lot of progress, probably because of the different
source files you pointed me to.

I get one error though and that has to do with this bit of code:

/*
** The version of the library
*/
const char sqlite3_version[] = SQLITE_VERSION;
BSTR __stdcall sqlite3_libversion(void){ return SysAllocStringByteLen(
sqlite3_version,strlen( sqlite3_version) ); }
BSTR __stdcall sqlite3_libversion_number(void){ return
SQLITE_VERSION_NUMBER; }

The error originates from the second line of code and shows like this in the
build window:

c:\sqlite\sourcewin\main.c(33) : error C2373: 'sqlite3_libversion' :
redefinition; different type modifiers

No idea what to do about this.


RBS


-Original Message-
From: Martin Jenkins [mailto:[EMAIL PROTECTED] 
Sent: 24 February 2007 13:29
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] compiling with VC++

RB Smissaert wrote:
> Thanks, will have a look at that.
> Do you know from experience that it will compile OK with VC6++?

I'm pretty sure I've compiled it with VC6++. I've been compiling on 
Debian and Solaris machines recently and have sort of lost track of 
building stuff on Windows. I tried upgrading to the current MS compilers 
but there seemed to be so many things that I didn't know I wanted that I 
think I gave up.

I'm having the same problems with installing the software for my phone. 
Been at it a couple of hours and so far it's changed my default email 
application, my default image viewer and my MP3 player and I still can't 
access the information I wanted off my phone. First and last Windows 
Smartphone I'll buy. It's "Smart" as in "Sting" rather than "Clever".

I'm going for a cup of tea and then I'll have a look and see if I can 
find some  VC6 project files for you. If I do I'll mail them straight to 
you rather than clutter up the list. If they work I suppose they could 
be uploaded somewhere.

Martin


-
To unsubscribe, send email to [EMAIL PROTECTED]

-





-
To unsubscribe, send email to [EMAIL PROTECTED]
---

RE: [sqlite] compiling with VC++

2007-02-24 Thread RB Smissaert
Think I got this fixed now.
It simply was something I had overlooked to change:

//const char *sqlite3_libversion(void);
BSTR __stdcall sqlite3_libversion(void);

Lots of warnings (265) but no errors and a dll is produced, which I will try
now.

RBS

-Original Message-
From: RB Smissaert [mailto:[EMAIL PROTECTED] 
Sent: 24 February 2007 13:47
To: sqlite-users@sqlite.org
Subject: RE: [sqlite] compiling with VC++

OK, thanks a lot.

I think I have made a lot of progress, probably because of the different
source files you pointed me to.

I get one error though and that has to do with this bit of code:

/*
** The version of the library
*/
const char sqlite3_version[] = SQLITE_VERSION;
BSTR __stdcall sqlite3_libversion(void){ return SysAllocStringByteLen(
sqlite3_version,strlen( sqlite3_version) ); }
BSTR __stdcall sqlite3_libversion_number(void){ return
SQLITE_VERSION_NUMBER; }

The error originates from the second line of code and shows like this in the
build window:

c:\sqlite\sourcewin\main.c(33) : error C2373: 'sqlite3_libversion' :
redefinition; different type modifiers

No idea what to do about this.


RBS


-Original Message-
From: Martin Jenkins [mailto:[EMAIL PROTECTED] 
Sent: 24 February 2007 13:29
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] compiling with VC++

RB Smissaert wrote:
> Thanks, will have a look at that.
> Do you know from experience that it will compile OK with VC6++?

I'm pretty sure I've compiled it with VC6++. I've been compiling on 
Debian and Solaris machines recently and have sort of lost track of 
building stuff on Windows. I tried upgrading to the current MS compilers 
but there seemed to be so many things that I didn't know I wanted that I 
think I gave up.

I'm having the same problems with installing the software for my phone. 
Been at it a couple of hours and so far it's changed my default email 
application, my default image viewer and my MP3 player and I still can't 
access the information I wanted off my phone. First and last Windows 
Smartphone I'll buy. It's "Smart" as in "Sting" rather than "Clever".

I'm going for a cup of tea and then I'll have a look and see if I can 
find some  VC6 project files for you. If I do I'll mail them straight to 
you rather than clutter up the list. If they work I suppose they could 
be uploaded somewhere.

Martin


-
To unsubscribe, send email to [EMAIL PROTECTED]

-





-
To unsubscribe, send email to [EMAIL PROTECTED]

-




-
To unsubscribe, send email to [EMAIL PROTECTED]
-



RE: [sqlite] compiling with VC++

2007-02-24 Thread RB Smissaert
OK, thanks a lot.

I think I have made a lot of progress, probably because of the different
source files you pointed me to.

I get one error though and that has to do with this bit of code:

/*
** The version of the library
*/
const char sqlite3_version[] = SQLITE_VERSION;
BSTR __stdcall sqlite3_libversion(void){ return SysAllocStringByteLen(
sqlite3_version,strlen( sqlite3_version) ); }
BSTR __stdcall sqlite3_libversion_number(void){ return
SQLITE_VERSION_NUMBER; }

The error originates from the second line of code and shows like this in the
build window:

c:\sqlite\sourcewin\main.c(33) : error C2373: 'sqlite3_libversion' :
redefinition; different type modifiers

No idea what to do about this.


RBS


-Original Message-
From: Martin Jenkins [mailto:[EMAIL PROTECTED] 
Sent: 24 February 2007 13:29
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] compiling with VC++

RB Smissaert wrote:
> Thanks, will have a look at that.
> Do you know from experience that it will compile OK with VC6++?

I'm pretty sure I've compiled it with VC6++. I've been compiling on 
Debian and Solaris machines recently and have sort of lost track of 
building stuff on Windows. I tried upgrading to the current MS compilers 
but there seemed to be so many things that I didn't know I wanted that I 
think I gave up.

I'm having the same problems with installing the software for my phone. 
Been at it a couple of hours and so far it's changed my default email 
application, my default image viewer and my MP3 player and I still can't 
access the information I wanted off my phone. First and last Windows 
Smartphone I'll buy. It's "Smart" as in "Sting" rather than "Clever".

I'm going for a cup of tea and then I'll have a look and see if I can 
find some  VC6 project files for you. If I do I'll mail them straight to 
you rather than clutter up the list. If they work I suppose they could 
be uploaded somewhere.

Martin


-
To unsubscribe, send email to [EMAIL PROTECTED]

-




-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] compiling with VC++

2007-02-24 Thread Martin Jenkins

RB Smissaert wrote:

Thanks, will have a look at that.
Do you know from experience that it will compile OK with VC6++?


I'm pretty sure I've compiled it with VC6++. I've been compiling on 
Debian and Solaris machines recently and have sort of lost track of 
building stuff on Windows. I tried upgrading to the current MS compilers 
but there seemed to be so many things that I didn't know I wanted that I 
think I gave up.


I'm having the same problems with installing the software for my phone. 
Been at it a couple of hours and so far it's changed my default email 
application, my default image viewer and my MP3 player and I still can't 
access the information I wanted off my phone. First and last Windows 
Smartphone I'll buy. It's "Smart" as in "Sting" rather than "Clever".


I'm going for a cup of tea and then I'll have a look and see if I can 
find some  VC6 project files for you. If I do I'll mail them straight to 
you rather than clutter up the list. If they work I suppose they could 
be uploaded somewhere.


Martin

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



RE: [sqlite] compiling with VC++

2007-02-24 Thread RB Smissaert
Thanks, will have a look at that.
Do you know from experience that it will compile OK with VC6++?

RBS

-Original Message-
From: Martin Jenkins [mailto:[EMAIL PROTECTED] 
Sent: 24 February 2007 12:02
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] compiling with VC++

RB Smissaert wrote:
> Could anybody pass me step by step instructions to compile the source with
> MS VC++ ? I don't code or compile in C at all and only code in VB/VBA.

There a some instructions at:

http://www.sqlite.org/cvstrac/wiki?p=HowToCompile


and a zip file - sqlite-source-3_3_13.zip - containing preprocessed 
source for Windows users at:

http://www.sqlite.org/download.html

I don't know if that latter file contains the headers you want as I 
mostly work on Linux.

This is a bit of an FAQ so you might want to take a look through the 
mailing list archives. There's one at news.gmane.org.

Shout again if this didn't help. ;)

Martin




-
To unsubscribe, send email to [EMAIL PROTECTED]

-




-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] compiling with VC++

2007-02-24 Thread Martin Jenkins

RB Smissaert wrote:

Could anybody pass me step by step instructions to compile the source with
MS VC++ ? I don't code or compile in C at all and only code in VB/VBA.


There a some instructions at:

http://www.sqlite.org/cvstrac/wiki?p=HowToCompile


and a zip file - sqlite-source-3_3_13.zip - containing preprocessed 
source for Windows users at:


http://www.sqlite.org/download.html

I don't know if that latter file contains the headers you want as I 
mostly work on Linux.


This is a bit of an FAQ so you might want to take a look through the 
mailing list archives. There's one at news.gmane.org.


Shout again if this didn't help. ;)

Martin



-
To unsubscribe, send email to [EMAIL PROTECTED]
-