For information on the latest version, please have a look at 1.33.5.
1.2.3 Linking Library
Note
Including the DRFL header also brings the declaration using namespace std; into the including file (from DRFS.h). Names in your code that match std names (for example byte, list, count) can then become ambiguous; qualify them or include the DRFL header only in source files that need it.
Linux Library
Create a file with a .conf extension (e.g., DRFLib.conf) in the /etc/ld.so.conf.d/ directory, add the .so file path to the file, and register the library by executing the ldconfig command.
The following example describes how to register and link the DRFL library in a Linux environment. Actual installation paths may vary depending on the user’s workspace and Linux distribution.
Note
The library installation path may differ depending on your workspace or system configuration.
When creating the .conf file, specify the actual directory path where the DRFL and Poco libraries are located.
1## 1. Verify the library path
2# Make sure the directory contains libDRFL, libPocoFoundation.so, and libPocoNet.so.
3ls /home/<user>/API-DRFL/library/Linux/64bits/amd64/{your_ubuntu_version}
4
5## 2. Add a .conf file under /etc/ld.so.conf.d/
6# Replace the path below with your actual library directory.
7sudo nano /etc/ld.so.conf.d/drfl.conf
8# Add the following single line to the file, then save and exit:
9/home/<user>/API-DRFL/library/Linux/64bits/amd64/{your_ubuntu_version}
10
11## 3. Register the library
12sudo ldconfig
13
14## 4. Build a sample C++ file
15# Specify the proper include and library directories.
16g++ test.cpp -o test \
17 -I/home/<user>/API-DRFL/include \
18 -L/home/<user>/API-DRFL/library/Linux/64bits/amd64/{your_ubuntu_version} \
19 -lDRFL -lPocoNet -lPocoFoundation -lpthread
Windows Library
Both Windows DLLs are MinGW builds. DRFLWin32.dll needs PocoFoundation.dll and PocoNet.dll next to it; DRFLWin64.dll needs PocoFoundation64.dll and PocoNet64.dll next to it.
The project settings for using this API in a C++ project are as follows.
Setting of header file (include)
[Configuration Properties]->[C/C++]->[General]->[Additional Include Directories]
Setting of library (lib) path
[Configuration Properties]->[Linker]->[General]->[Additional Library Directories]