Make sure you have the Windows/Linux drivers for our products installed. If you have installed our desktop software, SensorConnect on Windows, then the drivers were installed with it. If you want to install the drivers seperately, please visit our drivers page.
Download the pre-built Windows binaries.
You can copy the mscl.py and _mscl.pyd files into a path where python searches for modules. If you do this, you can simply use mscl from anywhere by adding import mscl to the top of your python files. To find where Python looks searches for modules on your system, print sys.path in your python environment.
Alternatively, you can import mscl by adding the full mscl path to sys.path:
import sys
sys.path.append('<pathToMsclPythonFiles>')
import msclAdd MSCL_Managed.dll as a Reference to your project
Place MSCL.dll next to your executable
Set your Platform Target to either x86 or x64
Note: The C++ MSCL library depends on Boost 1.68. You can download and install the pre-built Boost libraries (recommended), or build boost from source.
Point your compiler to the MSCL headers and lib files:
- Include directory:
C++/include - Link directory:
C++/lib/x64/Release - Link to:
MSCL.lib
Point your compiler to the Boost headers and lib files:
- Include directory:
<boostInstallPath>/boost(or whatever folder contains the boost.hppfiles) - Link directory:
<boostInstallPath>/lib64_msvc-14.0(or whatever folder contains the boost.libfiles) - Link to:
libboost_system-vc140-mt-s-x64-1_68.lib(or equivalent for your build environment)
Download the pre-built Linux packages.
To install the Ubuntu/Debian (.deb) package, run:
sudo dpkg -i <PACKAGE_NAME>.deb #install MSCL
sudo apt install -f #install dependenciesNote: to uninstall MSCL, run: sudo dpkg --remove <PACKAGE_NAME>.deb
To install the CentOS/Redhat (.rpm) package, run:
sudo yum install ./<PACKAGE_NAME>.rpm #install MSCL and it's dependenciesNote: to uninstall MSCL, run: sudo yum remove <PACKAGE_NAME>.rpm
After installing the package, a folder was created in /usr/share/. The name of the folder varies depending on which package you install (/usr/share/python2-mscl or /usr/share/python3-mscl)
Inside this folder, there will be two files:
mscl.py_mscl.so
If you copy these files into a path where python searches for modules, you can simply use mscl from anywhere by adding import mscl to the top of your python files. To find where Python looks searches for modules on your system, print sys.path in your python environment.
Alternatively, you can import mscl by adding the full mscl path to sys.path:
import sys
sys.path.append('/usr/share/<PYTHON_MSCL_FOLDER_NAME>/')
import msclAfter installing the package, a folder was created in /usr/share/ called c++-mscl.
This folder contains the MSCL headers, as well as a boost folder with the Boost library headers and libraries. You will need to tell your compiler to include these MSCL and Boost headers, as well as link to libmscl.so.
For example:
g++ -I/usr/share/c++-mscl/source -I/usr/share/c++-mscl/Boost/include YourFile.cpp -o YourProgram -L/usr/share/c++-mscl -lmscl -lstdc++ -std=c++11
Build error: /usr/bin/ld: /usr/share/c++-mscl/libmscl.so: undefined reference to 'pthread_...
Resolution: add -pthread argument prior to linking MSCL (... -pthread -L/usr/share/c++-mscl...)
Runtime error: error while loading shared libraries: libmscl.so: cannot open shared object file: No such file or directory
Resolution: in addition to linking at compile time, the application also needs to be able to find MSCL at runtime. There are a few ways to resolve this, one of which is to specify the runtime MSCL path in the build command: ... -L/usr/share/c++-mscl -Wl,-rpath,/usr/share/c++-mscl...