quiet / libcorrect

C library for Convolutional codes and Reed-Solomon
BSD 3-Clause "New" or "Revised" License
379 stars 94 forks source link

Added gitignore for build folder and fixed compilation issue in x64 #2

Closed racerxdl closed 8 years ago

racerxdl commented 8 years ago

It's recommended to always compile objects with Position Independent Code. With x64 compilation, its mandatory to use it or you will get this error:

/usr/bin/ld: src/reed-solomon/CMakeFiles/correct-reed-solomon.dir/reed-solomon.c.o: realocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
src/reed-solomon/CMakeFiles/correct-reed-solomon.dir/reed-solomon.c.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status

It should also give more performance since the -O3 level optimizations can be done better. This fixes the issue I had compiling it on my machine.

I also added gitignore to ignore build folder.

brian-armstrong commented 8 years ago

Awesome, looks good! Thanks.