vincentlaucsb / csv-parser

A high-performance, fully-featured CSV parser and serializer for modern C++.
MIT License
901 stars 150 forks source link

Error when compiling single_include_test #187

Closed realtimecarsten closed 2 years ago

realtimecarsten commented 2 years ago

downloaded the current repo, and tried to compile single_include_test.

I got the following compilation error: /usr/bin/ld: cannot find -lThreads::Threads

Now this does not look like a good name for a library. I guess it is the pthread library which is needed here.

I checked csv-parser/single_include_test/CMakeLists.txt and found the following line: target_link_libraries(single_include_test PRIVATE Threads::Threads)

Replaced the line with target_link_libraries(single_include_test PRIVATE pthread)

Then, compilation worked.

Way to reproduce:

vincentlaucsb commented 2 years ago

https://github.com/SimonRit/RTK/issues/314

This is a problem with CMake that can be fixed by upgrading it. Theads::Threads is a platform independent alias for pthreads.