Product: Abstract: ADAM-4501, ADAM-5510/TCP, ADAM-5510E/TCP, ADAM-5510M,

Transcription

Product: Abstract: ADAM-4501, ADAM-5510/TCP, ADAM-5510E/TCP, ADAM-5510M,
Product:
ADAM-4501, ADAM-5510/TCP, ADAM-5510E/TCP, ADAM-5510M,
ADAM-5510E
Abstract:
Compiling ADAM-4501 & ADAM-5510 Series sample codes in Borland C 3.0
Description:
This document shows how to compile sample codes under Borland C 3.0
environment.
We will use ADAM.C as the example.
Solution:
The ADAM-4500 Series or ADAM-5510 Series should be installed first.
Please follow the steps below:
1. Create a new directory C:\4501\.
2. Copy the file ADAM.C and ADAM.PRJ in the path C:\Program
Files\Advantech\ADAM-4500 Series Utility\Source\Example\httpEx to C:\4501\
3. Copy all the needed library and header files to the C:\4501 directory.
Please refer to the picture below.
Page
1
4. Launch the BC3.0 and open the project at C:\4501\.
Page
2
5. After opening the ADAM.PRJ, we can see the header files in the beginning of
ADAM.C. The stdio.h, io.h, process.h, stdlib.h, and string.h are in the “absolute
path” set in the OptionsÆDirectoriesÆInclude. While the 4500drv.h and
CGI_Lib.h are in the “relative path” C:\4501. (in the same path with ADAM.PRJ
at C:\4501\)
6. We also can see three library files “HIOS.LIB, UTILITYS.LIB, and
CGI_LIBS.LIB” in the project window.
Page
3
7. But we have to add the library files again because the used libraries are in the
different path for this example.
8. Add the CGI_LIBS.LIB, HIOS.LIB and UTILITYS.LIB in C:\4501\
Page
4
9. Go to OptionsÆDirectories and set the path of Borland C3.0 Include and Library
files.
Set the directories as following picture shows.
Page
5
10. Go to OptionsÆCompilerÆCode generation to set the Model to “Small.”
Page
6
11. Build the project and the executable file is generated. Finished!
Page
7