SQLite Forum

Compiling FILEIO.C
> Attempt 1: ...<br>
fatal error C1034: ??.h: no include path set

The single-line, compile/link invocation works if my [advice in post 2](https://sqlite.org/forum/forumpost/188a920d07823b65?t=h) is followed. Without that environment variable setup, the CL.exe compile/link driver does not know where to find system include files and libraries unless they are (tediously and laboriously) specified at each tool invocation. (Avoidance of the tedium and labor, and the study needed to perform it, is why the batch files and shortcuts to them exist.)

> Attempt 2: ...<br>
... error LNK2005: ... already defined in ...

The post in which I embedded utf8_to_wide.c advised this build method:<code>
  Build thusly on Windows using the MSVC development tool set:
    CL -Os utf8_to_wide.c -link -dll -out:fileio.dll
</code>. Note that a single translation unit is compiled. A glance at that code shows that it \#include's a couple of other sources directly. If you additionally compile those and attempt to link the resulting object files, you are bound to get multiple-definition errors.

If you really want to use your IDE to individually compile the C sources and link the results, you will need to do at least this to utf8_to_wide.c: (1) Remove the \#include lines which incorporate fileio.c and test_windirent.c into the same compilation; and (2) Add one or more \#include lines to bring in headers that fileio.c had itself \#include'd. Then you will need to set preprocessor symbols for each of the 3 translation units equivalently to what utf8_to_wide.c had arranged as it caused them all to be compiled. (There may be a single set of values that works for all 3, or they may have to differ; I don't know.)

Now I must say something that might seem unkind (but is not:) If you are intent on being a software developer, you **must** learn to read and understand error messages that come from the tools you use. Bringing each little tool complaint to a forum where other participants are willing and able to do that is not a workable approach. A web search for the portions of error messages not specific to your project(s) may be illuminating as you initially learn what they mean. But the errors that have appeared in your threads here are very fundamental -- so much so that you should be making your own effort to discover what they mean. That is how you will progress up the learning curve.