ultravideo / uvg266

An open-source VVC encoder based on Kvazaar
BSD 3-Clause "New" or "Revised" License
217 stars 16 forks source link

How do I merge pthread.cpp with codec? #4

Closed Jamaika1 closed 2 years ago

Jamaika1 commented 2 years ago

I wonder what are pthread.cpp and semaphore.cpp for? I compiled the add-ons in C++11 and was unable to merge the codec. I had to use libpthread. Is that good thinking?

Jovasa commented 2 years ago

uvg266 uses pthreads, which is present in any Unix based platform (including MinGW and derivatives) but not on native Windows which is why we created https://github.com/ultravideo/ThreadWrapper as a minimal implementation of pthreads so that we no longer needed a third party dependency to a pthreads library.

If you are on Unix based system you should use the platform supplied pthreads.

fador commented 2 years ago

In practice we have only used our built-in pthread wrapper with visual studio like the CMakeLists.txt does currently: https://github.com/ultravideo/uvg266/blob/master/CMakeLists.txt#L119

Jamaika1 commented 2 years ago

I already know what I didn't know. I used c11. Should be c++11 for library merge

c:/msys1201/bin/../lib/gcc/x86_64-w64-mingw32/12.0.1/../../../../x86_64-w64-mingw32/bin/ld.exe: pthread.o:pthread.cpp:(.xdata+0x94): undefined reference to `__gxx_personality_seh0'