GerHobbelt / pthread-win32

clone of pthread-win32 (a.k.a. pthreads4w) + local tweaks (including MSVC2008 - MSVC2022 project files)
Other
343 stars 165 forks source link

autostatic.c seems to be missing. #23

Open jakanidk opened 1 year ago

jakanidk commented 1 year ago

Hello

My Visual Studio 2017 can't find the autostatic.c file.

Can you please enlighten me what is wrong ?

Best regards, Jan

yuhongjiu commented 1 year ago

I encountered the same problem

GerHobbelt commented 1 year ago

Haven't used VS2017 in a long time (currently using VS2022 here). Anyway, from the changelog:

Static linking: The autostatic functionality has been moved to dll.c, and extended so that builds using MSVC8 and later no longer require apps to call pthread_win32_thread_detach_np(). That is, all of the DllMain functionality is now automatic for static linking for these builds.

so it sounds to me like those old MSVC project files are a bit out of date and should include dll.c instead. HTH.