Yeah, I had a lot of problems with the fileio.c extension after the fsdir virtual table was added. It needs a header file "test_windirent.h" to be available. I had to do some fiddling to get it to compile properly using MinGW (GCC) on Windows. I thought Richard had fixed it.
It also makes calls back into the sqlite3 core (the sqlite_win32_utf8_to_unicode) that cannot be resolved when compiling as an extension. This has not been fixed yet. (but it does compile inline in shell.c and I have managed to get it added to the core sqlite3.c build). It took me a while to get it to works with GCC. However, it gets included in the shell.c automatically and I presume the shell.c compiles under MSVC so however it works it does work. You may just need to make sure the test_windirent.c header is available as well. --- The fact that there's a Highway to Hell but only a Stairway to Heaven says a lot about anticipated traffic volume. >-----Original Message----- >From: sqlite-users [mailto:sqlite-users- >boun...@mailinglists.sqlite.org] On Behalf Of x >Sent: Saturday, 16 June, 2018 08:06 >To: SQLite mailing list >Subject: Re: [sqlite] .timer > >I’m trying to add fileio.c to my core_init function so I can >investigate if the readfile and writefile functions would help here. >I’ve added > >#include “fileio.c” > >Inside the core_init function what do I add ? > > nErr += >sqlite3_auto_extension((void(*)())sqlite3_fileio_init); // >?????????? >or > nErr += >sqlite3_auto_extension((void(*)())sqlite3_readfile_init); // >?????????? > nErr += >sqlite3_auto_extension((void(*)())sqlite3_writefile_init); // >????????? > >When the compiler reaches the ‘#include “fileio.c” I get several >error messages > >[bcc64 Error] fileio.c(507): unknown type name 'DIR' >[bcc64 Error] fileio.c(661): incomplete definition of type 'struct >DIRENT' > fileio.c(659): forward declaration of 'struct DIRENT' >[bcc64 Error] fileio.c(662): incomplete definition of type 'struct >DIRENT' > fileio.c(659): forward declaration of 'struct DIRENT' >[bcc64 Error] fileio.c(662): incomplete definition of type 'struct >DIRENT' > fileio.c(659): forward declaration of 'struct DIRENT' >[bcc64 Error] fileio.c(663): incomplete definition of type 'struct >DIRENT' > fileio.c(659): forward declaration of 'struct DIRENT' >[bcc64 Error] fileio.c(666): incomplete definition of type 'struct >DIRENT' > fileio.c(659): forward declaration of 'struct DIRENT' >Failed >Elapsed time: 00:00:01.3 > >I can see these are defined in test_windirent.h and fileio.c has the >line “include “test_windirent.h” so I don’t know why I’m getting >these. >_______________________________________________ >sqlite-users mailing list >sqlite-users@mailinglists.sqlite.org >http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users