Skip to content

Commit

Permalink
Fixed instructions for linking with Blosc
Browse files Browse the repository at this point in the history
  • Loading branch information
FrancescAlted committed Aug 21, 2014
1 parent 765e91b commit b37ca0b
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 12 deletions.
8 changes: 4 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -105,19 +105,19 @@ To compile using GCC (4.4 or higher recommended) on Unix:

.. code-block:: console
$ gcc -O3 -msse2 -o myprog myprog.c blosc/*.c -lpthread
$ gcc -O3 -msse2 -o myprog myprog.c blosc/*.c -Iblosc -lpthread
Using Windows and MINGW:

.. code-block:: console
$ gcc -O3 -msse2 -o myprog myprog.c blosc\*.c
$ gcc -O3 -msse2 -o myprog myprog.c -Iblosc blosc\*.c
Using Windows and MSVC (2010 or higher recommended):

.. code-block:: console
$ cl /Ox /Femyprog.exe myprog.c blosc\*.c
$ cl /Ox /Femyprog.exe /Iblosc myprog.c blosc\*.c
In the `examples/ directory
<https://github.com/Blosc/c-blosc/tree/master/examples>`_ you can find
Expand Down Expand Up @@ -151,7 +151,7 @@ Blosc but with added Zlib support do:

.. code-block:: console
$ gcc -O3 -msse2 -o myprog myprog.c blosc/*.c -lpthread -DHAVE_ZLIB -lz
$ gcc -O3 -msse2 -o myprog myprog.c blosc/*.c -Iblosc -lpthread -DHAVE_ZLIB -lz
In the `bench/ directory
<https://github.com/Blosc/c-blosc/tree/master/bench>`_ there a couple
Expand Down
9 changes: 7 additions & 2 deletions examples/many_compressors.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,13 @@
or, if you don't have the blosc library installed:
gcc -O3 -msse2 many_compressors.c ../blosc/*.c -o many_compressors \
-lpthread -DHAVE_ZLIB -lz -DHAVE_LZ4 -llz4 -DHAVE_SNAPPY -lsnappy
gcc -O3 -msse2 many_compressors.c ../blosc/*.c -I../blosc \
-o many_compressors -lpthread \
-DHAVE_ZLIB -lz -DHAVE_LZ4 -llz4 -DHAVE_SNAPPY -lsnappy
Using MSVC on Windows:
cl /Ox /Femany_compressors.exe /Iblosc many_compressors.c blosc\*.c
To run:
Expand Down
12 changes: 8 additions & 4 deletions examples/multithread.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,17 @@
Example program demonstrating use of the Blosc filter from C code.
To compile this program:
To compile this program using gcc or clang:
gcc/clang multithread.c -o multithread -lblosc -lpthread
gcc multithread.c -o multithread -lblosc -lpthread
or, if you don't have the blosc library installed:
gcc -O3 -msse2 multithread.c ../blosc/*.c -o multithread -lpthread
gcc -O3 -msse2 multithread.c ../blosc/*.c -I../blosc -o multithread -lpthread
Using MSVC on Windows:
cl /Ox /Femultithread.exe /Iblosc multithread.c blosc\*.c
To run:
Expand Down
8 changes: 6 additions & 2 deletions examples/simple.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,12 @@
or, if you don't have the blosc library installed:
gcc -O3 -msse2 simple.c ../blosc/*.c -o simple -lpthread
gcc -O3 -msse2 simple.c ../blosc/*.c -I../blosc -o simple -lpthread
Using MSVC on Windows:
cl /Ox /Fesimple.exe /Iblosc simple.c blosc\*.c
To run:
$ ./simple
Expand Down

0 comments on commit b37ca0b

Please sign in to comment.