Skip to content

Commit

Permalink
Update HowToUseMSCL.md
Browse files Browse the repository at this point in the history
  • Loading branch information
msclissa authored Jun 3, 2021
1 parent 1d09100 commit 9648a78
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion HowToUseMSCL.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,11 @@ After installing the package, a folder was created in `/usr/share/` called `c++-
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```
```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```

#### A couple common issues:
**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...`

0 comments on commit 9648a78

Please sign in to comment.