Re: [sqlite] Compile SQLite3 for MS Windows Driver Kit user-mode application
Hi again, First, I am not an expert in WDK programming. But there are a few nice samples very close to what I need and thus I tried to compile a WDK sample with the sqlite3 DLL. The sample is a minifilter driver, which consists of two parts: the minifilter driver itself, which runs in kernel-mode and a user-mode application that catches the filtered requests through a communication port bridging the kernel- and user-mode. I changed the user-mode application to use the sqlite3 api. To start with, I didn't do much in the code, just open/close a database. In order to build the user-mode application, I generated a lib-file for the sqlite3.dll. However, the WDK environment ignored the lib-file entirely whatever I tried. I couldn't figure out why but I guess this does not really work. For example, the standard C libraries and headers are all shipped separately with the WDK. My second approach was to compile sqlite3 myself within the WDK. But the WDK build environment requires warnings to be treated as errors which in my opinion makes perfect sense. (I woudln't believe 10 agreeing programmers either; I have seen examples where all of them agreed that there would be no coding error. But of course this was the case. Btw, why checking intellectually that the conversions are safe when fixing it properly takes no time in comparison?? I don't believe it is checked.) Also, the number of warnings/errors is higher than in normal Win32 build (679 warnings to 524 warnings on warning level 4). Plus 1 error regarding localtime_s (C4013, undefined). This error is crazy as the function is in the defined by the WDK as well as included to the source. But this is a side note only. Mark Spiegel wrote: > Not sure why the Win32 DLL is not compatible. I would think it should > be. You might want to work that out first. Can you elaborate? > > As for compiling with the WDK, it can be done. The amalgamated source > is > > best.> > The flood of warnings is a pain. SQLite dev claims they are all > > > spurious, but with so many I wouldn't venture to guess how they can tell.> > > > For W32, you should be able to disable "treat warnings as errors" for > > > just the sqlite3.c file if your development organization allows this. > If > > you are building 64 bits, then you have more work to do. The last > time I > > ported in new SQLite source, it still cast 32 bit integers into > 64 bit > > pointers. The WDK compiler isn't going to allow this without > some source > > modifications. I did write a ticket so this might be > fixed. As of the > > last time I checked, it was not.> > Bjorn Rauch wrote:> > Hello,> > > > Has > > anybody tried to compile SQLite3 with the MS WDK? The Win32 > > DLL is not compatible as far as I understand and recompiling with the > > WDK is > necessary. But using the source code as is results in many > > warnings (mostly conversion errors). The WDK does not tollerate these.> > > > > > Best regards,> > Bjorn _ Explore the seven wonders of the world http://search.msn.com/results.aspx?q=7+wonders+world=en-US=QBRE ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Compile SQLite3 for MS Windows Driver Kit user-mode application
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dan wrote: >http://www.sqlite.org/faq.html#q17 Just for the record, compiling with GCC on 64 bit Linux with -Wall results in about 20 'variable may be used uninitialized in this function', although I believe they are all because the compiler doesn't do interprocedure analysis and hence doesn't realise that is impossible. Adding the -W flag then gives pages of missing initializers (harmless), unused parameters (often due to callback signatures), and a huge number of signed vs unsigned issues (comparisons, ternary expression have different signedness). Someone else mentioned the clang analyser in a ticket and I went and copied in results about several places where variables are set to values and the variables were then set again to something else without a use in between, or never used. See the last comment of http://www.sqlite.org/cvstrac/tktview?tn=3391 Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFI67IsmOOfHg372QQRAtEOAJ9UJLREJp7NEzqdoF2TPiRiDJx9FgCfZa67 7X/Hg6Vo5LMaVcJ0jnQJn0g= =r1BW -END PGP SIGNATURE- ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Compile SQLite3 for MS Windows Driver Kit user-mode application
> The flood of warnings is a pain. SQLite dev claims they are all > spurious, but with so many I wouldn't venture to guess how they can > tell. http://www.sqlite.org/faq.html#q17 ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Compile SQLite3 for MS Windows Driver Kit user-mode application
Not sure why the Win32 DLL is not compatible. I would think it should be. You might want to work that out first. Can you elaborate? As for compiling with the WDK, it can be done. The amalgamated source is best. The flood of warnings is a pain. SQLite dev claims they are all spurious, but with so many I wouldn't venture to guess how they can tell. For W32, you should be able to disable "treat warnings as errors" for just the sqlite3.c file if your development organization allows this. If you are building 64 bits, then you have more work to do. The last time I ported in new SQLite source, it still cast 32 bit integers into 64 bit pointers. The WDK compiler isn't going to allow this without some source modifications. I did write a ticket so this might be fixed. As of the last time I checked, it was not. Bjorn Rauch wrote: > Hello, > > Has anybody tried to compile SQLite3 with the MS WDK? The Win32 DLL is not > compatible as far as I understand and recompiling with the WDK is necessary. > But using the source code as is results in many warnings (mostly conversion > errors). The WDK does not tollerate these. > > Best regards, > Björn > _ > News, entertainment and everything you care about at Live.com. Get it now! > http://www.live.com/getstarted.aspx > ___ > 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
[sqlite] Compile SQLite3 for MS Windows Driver Kit user-mode application
Hello, Has anybody tried to compile SQLite3 with the MS WDK? The Win32 DLL is not compatible as far as I understand and recompiling with the WDK is necessary. But using the source code as is results in many warnings (mostly conversion errors). The WDK does not tollerate these. Best regards, Björn _ News, entertainment and everything you care about at Live.com. Get it now! http://www.live.com/getstarted.aspx ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users