SQLite Forum

Compiling FILEIO.C
Login
Thank you for re-visiting this; sharing your insight is much appreciated.

<b>Attempt 1: </b>

>CL -Os utf8_to_wide.c -link -dll -out:fileio.dll

And that takes me straight to the 

>  fatal error C1034: ??.h: no include path set

Finding each *.h file and copying to the location where I have FILEIO.C & other files will take a long time.

<b> Attempt 2:</b>

I created a DLL project in VS2019. I feel that I am nearer to compiling FILEIO.C successfully but not quite there yet. Here's the output:

```

Rebuild started...
------ Rebuild All started: Project: FILEIO, Configuration: Release x64 ------
FILEIO.C
test_windirent.c
utf8_to_wide.c
Generating Code...
utf8_to_wide.obj : error LNK2005: closedir already defined in test_windirent.obj
utf8_to_wide.obj : error LNK2005: opendir already defined in test_windirent.obj
utf8_to_wide.obj : error LNK2005: readdir already defined in test_windirent.obj
utf8_to_wide.obj : error LNK2005: readdir_r already defined in test_windirent.obj
utf8_to_wide.obj : error LNK2005: sqlite3_fileio_init already defined in FILEIO.obj
utf8_to_wide.obj : error LNK2005: windirent_getenv already defined in test_windirent.obj
utf8_to_wide.obj : error LNK2005: sqlite3_api already defined in FILEIO.obj
   Creating library E:\SQLite_The Hospital\FILEIO\x64\Release\FILEIO.lib and object E:\SQLite_The Hospital\FILEIO\x64\Release\FILEIO.exp
LINK : fatal error LNK1561: entry point must be defined
Done building project "FILEIO.vcxproj" -- FAILED.
------ Rebuild All started: Project: FILEIO, Configuration: Debug x64 ------
FILEIO.C
test_windirent.c
utf8_to_wide.c
Generating Code...
utf8_to_wide.obj : error LNK2005: closedir already defined in test_windirent.obj
utf8_to_wide.obj : error LNK2005: opendir already defined in test_windirent.obj
utf8_to_wide.obj : error LNK2005: readdir already defined in test_windirent.obj
utf8_to_wide.obj : error LNK2005: readdir_r already defined in test_windirent.obj
utf8_to_wide.obj : error LNK2005: sqlite3_fileio_init already defined in FILEIO.obj
utf8_to_wide.obj : error LNK2005: windirent_getenv already defined in test_windirent.obj
utf8_to_wide.obj : error LNK2005: sqlite3_api already defined in FILEIO.obj
   Creating library E:\SQLite_The Hospital\FILEIO\x64\Debug\FILEIO.lib and object E:\SQLite_The Hospital\FILEIO\x64\Debug\FILEIO.exp
FILEIO.obj : error LNK2019: unresolved external symbol sqlite3_win32_utf8_to_unicode referenced in function statTimesToUtc
test_windirent.obj : error LNK2019: unresolved external symbol sqlite3_malloc referenced in function opendir
test_windirent.obj : error LNK2019: unresolved external symbol sqlite3_free referenced in function closedir
test_windirent.obj : error LNK2019: unresolved external symbol sqlite3_stricmp referenced in function opendir
E:\SQLite_The Hospital\FILEIO\x64\Debug\FILEIO.dll : fatal error LNK1120: 4 unresolved externals
Done building project "FILEIO.vcxproj" -- FAILED.
========== Rebuild All: 0 succeeded, 2 failed, 0 skipped ==========

```