File path problems

The compiler does not find the standard include files, but they are definitely on my disk!

The linker says “Error: Cannot open 'c64.lib': No such file or directory” but c64.lib exists in the lib directory.

The compiler and the linker must know how to find the include files and libraries. A standard path is compiled into the binaries, but this path works only for Unix machines (provided that the include files and libraries are installed in this path, which is true if you're using one of the precompiled packages).

When running the tools under Windows or DOS, you have to tell them where the support files are installed. This is done by setting one or more of the environment variables:

As a DOS/Windows example, if you have installed cc65 in c:\cc65, you should use

    set CC65_HOME=c:\cc65

Note: The Windows .exe installer package will set all necessary variables for you, so Windows users are encouraged to use it instead of the .ZIP file distribution.

Unix people usually don't have a problem setting environment variables, so I don't explain the Unix syntax here 8-)