For the DOS (Borland) port I remember having lots of trouble getting
SDCC to work due to SDCC not being able to find the lib or include
directories. I had installed them in C:\utils\sdcc (or something
similar) whereas there were paths hard coded into the SDCC source. One
workaround was to use the -I and -L options to the compiler.
This problem was compounded by the fact that the DOS port which I
downloaded didn't include any documentation. I suspect this is why so
many people have trouble when they first try using the DOS port of this
The bin directory of course is simply added to the path, so wasn't a
My suggestion, is why not look for a $SDCCLIB environmental variable,
under which the lib and include directories will be searched for. If not
found there then search for the hard coded paths. If either the lib or
the include directory isn;t found by SDCC, how about printing out a nice
multi line message which says something like...
"Fatal error: lib directory not found"
" Either install the lib directory under c:\sdcc "
" set SDCCLIB=c:\where\ever\ to point to the lib directory".
" refer to the documentation file <sdcc_dos.html> for further
Just a few ideas.