SQLite Forum

Compiling FILEIO.C
Login
I have checked in a <u>[revised fileio.c](https://www.sqlite.org/src/file?name=ext/misc/fileio.c&ci=trunk)</u> which better accomplishes the effect of the separate source I posted earlier in this thread. 

The fileio.dll extension can now be built thusly:<code>
    CL -Os -DFILEIO_WIN32_DLL fileio.c -link -dll -out:fileio.dll
</code>, (assuming that a suitable vc_vars??.bat is run first as discussed earlier.) It is still necessary to have test_windirent.c, test_windirent.h, sqlite3ext.h and sqlite3.h in the same directory as fileio.c (or made #include'able via CL.exe's -I option.)

I would appreciate it if you could use that source to build and verify satisfactory operation of the fileio extension.<sup>a</sup> Please post results, positive or otherwise. (And consider it payback for the technical help.)


----

a. The resulting image has a slight improvement: The extension code which traffics in heap allocated objects with the SQLite library will use the same allocator that has been used by default or designated for the library's use via [sqlite3_config](https://sqlite.org/c3ref/config.htmlhttps://sqlite.org/c3ref/config.html). This defaults to malloc() and its cohorts, so this improvement will usually have no effect.