This site contains older material on Eiffel. For the main Eiffel page, see http://www.eiffel.com.

I cannot compile the generated C code

Problem

During a freezing operation, the C compiler cannot find standard include files or libraries, or the make (or nmake) command fails.

The error may be something like:

    Fatal error C1083: Cannot open include file: 'stdlib.h':
    No such file or directory
    

or

    c:>nmake
    The name specified is not recognized as an internal or
    external command, operable program or batch file.
    

If the error occurs in multithreaded mode see also the companion page on multithreaded compilation problems. If you are using the Borland C compiler check the Borland problems page.

Explanation

Your C compiler is probably not set to be run from the command line.

Fix

You may want to rerun the installation of your C compiler, because some installation programs give you possibility to set the option to run from the command line. This will probably be easier than setting the option manually.

If you decide to set the option manually you should consult your operating system manual for the details. Here are some hints as to how to proceed: first, how to set environment variables in general; then, what variables to set in this case.

Setting environment variables

On Windows 95 the best way is probably to add or modify the variables in your autoexec.bat file. Make sure to modify the correct autoexec.bat, as there might be several files with that name on your system! On Windows NT you should modify (or add) user variables. To do so, go to System Properties, either through `System' in the Control Panel, or by right-clicking on `My Computer' and selecting `Properties'. In System Properties, go to Environment, then User Variables.

Necessary variables and their values

For Microsoft C (depending on version and installation directory of course) variables should include:

    Variable: PATH
    Value:

      c:\program files\devstudio\sharedide\bin\ide;c:\program files\devstudio\sharedide\bin;c:\program files\devstudio\vc\bin;%eiffel4%\bench\spec\%platform%\bin

    Variable: INCLUDE
    Value:

      c:\program files\devstudio\vc\include;c:\program files\devstudio\vc\atl\include;c:\program files\devstudio\vc\mfc\include;

    Variable: LIB
    Value:

      c:\program files\devstudio\vc\lib;c:\program files\devstudio\vc\mfc\lib;

For Borland C(depending on version and installation directory) of course) variables should include:

    Variable: EIF_BORLAND (see also the page on specific Borland problems)
    Value:
      Absolute directory where the libraries were installed. By default this is
        c:\BC5\lib\

    Variable: PATH
    Value:
      bin subdirectory of compiler installation directory. By default this is
        c:\BC5\bin

If you still have a problem, contact ISE customer support http://support.eiffel.com.