kaitz / paq8pxd

GNU General Public License v2.0
68 stars 7 forks source link

Fix pthreads linux #16

Closed moisespr123 closed 3 years ago

moisespr123 commented 3 years ago

Fixes compilation on Linux when -DMT was enabled.

The below error was given before:

/usr/bin/ld: CMakeFiles/paq8pxd.dir/paq8pxd.cpp.o: in function `main':
paq8pxd.cpp:(.text.startup+0x2ae9): undefined reference to `pthread_join'
/usr/bin/ld: paq8pxd.cpp:(.text.startup+0x2cc4): undefined reference to `pthread_create'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/paq8pxd.dir/build.make:105: paq8pxd] Error 1
make[1]: *** [CMakeFiles/Makefile2:95: CMakeFiles/paq8pxd.dir/all] Error 2
make: *** [Makefile:103: all] Error 2

Now it works:

[100%] Linking CXX executable paq8pxd
[100%] Built target paq8pxd