Skip to content

Commit

Permalink
Merge pull request #2 from oktonion/work
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
oktonion authored Jul 31, 2018
2 parents 9750504 + 52487de commit 426d63b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,15 @@ The library is in development so no backward compability guaranteed with previou
Build process is simple:
* In Unix - either run a 'build_lib.sh' script (works with g++ and clang if enviromental variable $COMPILER is set to compiler name, f.e. to 'clang++-3.5') or build by yourself static library from 'stdex/src' directory sources.
* In Windows - either run a 'build_lib.bat' script (works with Visual Studio if enviromental variables are set by 'vsvars32.bat' script that is being shipped with your Visual Studio distributive) or build by yourself the static library from 'stdex/src' and 'pthreads-win32' directories sources.
* In QNX 6.x.x - either run a 'build_lib_qnx.sh' (using qcc compiler) or build by yourself the static library from 'stdex/src' directory sources (do not forget to link with 'stdlib' library).

# how to include in your project
In your project:
1. include sources of the library or link with prebuilded static library ('.a'/'.lib' file, f.e. 'libstdex.a'/'stdex.lib')
2. link with system libraries for POSIX-threads and realtime clocks:
* 'librt.lib' and 'libpthread.lib' in UNIX;
* 'ntdll.lib' and [POSIX-threads lib](https://github.com/GerHobbelt/pthread-win32 "I'm using this implementation") in Windows (if you have built stdex static library with 'pthreads-win32' sources then you have no need to link with pthreads anymore - it's already in 'stdex.lib');
* 'm.lib' in QNX 6.x.x;
3. enjoy

example script build for Ubuntu (with g++ installed):
Expand All @@ -50,3 +52,9 @@ set LIB=%LIB%C:\Program Files (x86)\Windows Kits\8.1\Lib\winv6.3\um\x86\;
cl -EHsc -Fo.\obj\main.obj -c ".\main.cpp"
cl .\obj\main.obj stdex.lib ntdll.lib -Fe.\bin\main.exe -link -LIBPATH:.\stdex\lib
```

example script build for QNX 6.x.x (with qcc installed):
```
COMPILER=qcc
$COMPILER main.cpp -L./stdex/lib/ -lstdex -lm -o "./bin/main"
```

0 comments on commit 426d63b

Please sign in to comment.