Hi guys! I built the K8061 USB Interface project and it works fine with the included Test Demo program. I also put the included files ‘K8061.dll’ and ‘MPUSBAPI.dll’ over into the ‘Windows/System32’ subdirectory (as recommended).
PRELUDE/BACKGROUND Info (regarding my Question and my Problem):
Now, just so you know, the FPC free pascal (that is available for download at freepascal.org) has an ‘OPTIONS’ tab (in the list with ‘FILE’ ‘EDIT’ ‘COMPILE’ etc.) and, once selected, the dialog box that appears has numerous Compiler Options. One of the options permits you to compile your source code FILE as if it were written in Delphi. I selected the ‘Delphi’ option. For simple ‘Hello World!’ programs, everything works fine when this is done.
Now, included with the K8061 kit is a PDF file called ‘K8061_DLL_manual.pdf’. In this file the documentation gives source code (written in Delphi) for creating a ‘unit’ that accesses the routines held within the ‘K8061.DLL’ dynamic link library. I copied this source code and created a source code FILE with a ‘.PAS’ extension. The FPC free pascal acknowledges and loads this ‘.PAS’ file into its IDE editor without any problem. (NOTE: within the source code, the first line has the command word ‘unit’. The name of the ‘unit’ appears IMMEDIATELY next in the source code. The name that you give TO the source code file ON YOUR DISK MUST BE EXACTLY THE SAME AS the name for the ‘unit’ that appears immediately AFTER the command word ‘unit’ in the source code. Before these items were Matched Up, I would get a compiler error. Now they are matched up and I do not get the associated error).
So far, so good.
MY PROBLEM:
When I go to ‘COMPILE’ the loaded source code FILE (to create a useable User Defined ‘unit’ from it), I get ONE Compiler Error. The compiler error reads as follows:
(8,47) Fatal: Can't find unit Graphics used by <sourcecodeFILE> .
The word ‘Graphics’ appears once and only once in the entire copied source code FILE. It appears near the top of the source code in a ‘uses’ statement. Apparently, ‘Graphics’ is supposed to be a standard ‘unit’ that is part of the Delphi language. For some reason, the FPC free pascal compiler (which was ‘OPTIONS’ -set to compile the source code as Delphi ) can’t locate the code to suppport the ‘uses’ statement that specifically calls out a ‘unit’ called ‘Graphics’.
MY QUESTION:
Can anybody tell me HOW to resolve this Compiler Error ??