Library Usage Problems (I think)

I’m getting started with DC (I know “regular” C quite well) and I’m having problems when I try to “#use” a library. The two that are currently giving me problems are RS232.LIB and STRING.LIB. Both of these give me a compile error telling me about duplicate names.

In RS232.LIB, the duplicate is RS232_echo and in STRING.LIB it’s _xtoxErr. The only other library I’m using is one that I’m writing and it doesn’t use or reference either of these routines. In fact, I haven’t started coding ANY of the RS232 routines yet, I just added the #use statement to my main.c file and tried to compile.

What am I doing wrong here? It also says “First one ignored…” on the error line but it stops compiling and just stops there.

len morgan

Dont include those libraries. They are implicitly included already for you in your LIB.DIR file. I know it’s a bit non standard.

Thanks, that solved the error message problem. Does your answer indicate that ANY library listed in LIB.DIR doesn’t have to be included with a “#use” statement?

len morgan

That is correct.
Furthermore when you write your own libraries, you have to place a entry for each in the LIB.DIR file, and #use them in your program.
I refer you to the Dynamic C User manual page 38
“Most libraries needed by Dynamic C programs have a #use statement in the file
lib\default.h.”