This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Environment settings has not effect for C51, C251 or C166 compilers

Hi all,

I faced with a bit problem is that the C166LIB, C51LIB, and C251LIB environment variables does nothing.

e.g. the documentation say that the C166LIB variable specifies a search path to the libraries to link them:

* https://www.keil.com/support/man/docs/c166/c166_cm_envvars.htm

In my case I have the project with the object files in the following tree:

  • c:\Keil_v5\c166\Examples\foo\main.o
  • c:\Keil_v5\c166\Examples\foo\libs\lib-a.lib
  • c:\Keil_v5\c166\Examples\foo\libs\lib-b.lib

so, as you can see, the my static libraries locates in the c:\Keil_v5\c166\Examples\foo\libs directory,

and I want to specify a path to this directory for linker search:

  • set C166LIB="c:\Keil_v5\c166\Examples\foo\libs;c:\Keil_v5\c166\lib"

and then I run the linker:

  • c:\Keil_v5\c166\bin\l166 main.o,lib-b.lib,lib-a.lib to foo.out

but the linker fails:

*** FATAL ERROR L210: I/O ERROR ON INPUT FILE:
    EXCEPTION 0021H: PATH OR FILE NOT FOUND
    FILE: LIB-B.LIB

it can't find the libraries.

Why this happens? How to specify a paths to search the libraries?


Parents Reply Children
No data