I do not use LCC, so my answers are generic, you'll have to fill in
the details.
>It comes with some user written libraries, notably ERutilities.h and ER.h.
These are not libraries, these are "header files". They contain
definitions that let your code use functions provided somewhere else.
That somewhere else are the actual libraries.
> It took me some time to realize that I could put these files in the same folder as my .c file.
Or, you could have told the compiler where to find the header files
with the proper parameters, project setup, etc.
> However, when I attempt to compile, I'm told there's an undefined reference to _ReadFdGet_USTATS - and there are several other such errors.
Link time errors, no compile errors. That is, your program references
("tries to use") ReadFdGet_USTATS, the included header file lets your
code know that there is indeed such a function, what parameters it
takes, etc, but the actual code for ReadFdGet_USTATS is not provided.
(Again, the header file *is not* the library)
>After minimal digging around, I found that in the ERutilities.h file, ReadFdGet_USTATS is defined, as
>void ReadFdGet_USTATS(char fname[], int scol, int fcol, double min, double max, double inc, char id,struct USTATS *s);
>Why is it that the reference is undefined? Is it somehow not correctly loading the .h file?
Header files are not "loaded", they are "included" and they are
included correctly.
You still need to add to your project and compile the files containing
the actual source code for these functions.
>Thanks much,
>Paul
--
Roberto Waltman
[ Please reply to the group,
return address is invalid ]