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:

  • CA65_INC (points to directory with assembler include files)
  • CC65_INC (points to directory with compiler include files)
  • LD65_CFG (points to directory with linker config files)
  • LD65_LIB (points to directory with libraries)
  • LD65_OBJ (points to directory with object files)
  • CC65_HOME (points to the cc65 file tree. If you have this one, you usually won't need the others).

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-)

cc65/file_path_problems.txt · Last modified: 2010-11-03 01:15 by polluks
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki