FieldTalk Modbus Slave C++ Library
Library version 2.9.1
|
1. Download and save the zip archive into a project directory.
2. Uncompress the archive using unzip or another zip tool of your choice:
The archive will create the following directory structure in your project directory:
3. The library is ready to be used.
4. Optionally re-compile from source:
The Windows Editions do come with pre-compiled static libraries for Visual C++ and do not require compilation from source code. However there may be cases where re-compilation is desired.
To re-compile, open the Visual Studio\mbusslave_win.vcxproj solution file with Visual Studio 2019. The project file will also work with older Visual Studio versions. The library will be compiled into one of the following sub-directories of your project directory:
Platform | Library Directory |
---|---|
Windows 64-bit, Visual Studio 2019 | lib\win\x64\Release |
Windows 32-bit, Visual Studio 2019 | lib\win\Win32\Release |
Windows CE, Visual Studio 2015 or 2013 | lib\wce\$(Platform)\Release |
1. Download and save the zipped tarball into your project directory.
2. Uncompress the zipped tarball using gzip:
3. Untar the tarball
The tarball will create the following directory structure in your project directory:
4. Compile the library from the source code. Enter the FieldTalk src directory and run make:
Note: Previous versions used a shell script to build, this version now uses the make utility to build.
The make file tries to detect your host platform and executes the compiler and linker commands targeting the host platform. The compiler and linker configurations are contained in the platform make files in the makefiles folder.
To cross-compile, pass the basename of the cross-compilation make file as parameter:
The cross compilation make files can be found in the makefiles directory and you can add more by copying and editing the supplied files to match your toolchain setting.
5. The library will be compiled into one of the following platform specfic sub-directories:
Platform | Library Directory |
---|---|
Linux | lib/linux |
QNX 6 | lib/qnx6 |
Solaris | lib/solaris |
HP-UX | lib/hpux |
IBM AIX | lib/aix |
Your directory structure looks now like:
6. The library is ready to be used.
There is no make file or script supplied for VxWorks because VxWorks applications and libraries are best compiled from the Tornado IDE.
To compile and link your applications against the FieldTalk library, add all the *.c and *.cpp files supplied in the src, src/hmlib/common, src/hmlib/posix4 and src/hmlib/vxworks to your project.