Replies: 5 comments 10 replies
-
Most compilers have a bunch libraries that they link to by default. That'll just be one of those defaults with your MinGW distribution. It's got nothing to do with any stb_* libraries since there aren't any build scripts here that would even define link libraries. |
Beta Was this translation helpful? Give feedback.
-
That's not how it works. If I compile and link hello-world.c it wont link to `libwinpthread-1.dll', or any other pthread library for that matter. Neither I don't use.
In Linux the result will be bit different
There is something regarding pthreads in the library that makes think compiler it uses pthreads. And that think is preprocessed in windows and not in *nix. |
Beta Was this translation helpful? Give feedback.
-
Again, it's not stb_* that's explicitly including that library. It's your compiler that's deciding that it's needed. In any case, since you've now decided to actually tell us that it's stb_image that you're using rather than expecting us read your mind, try using |
Beta Was this translation helpful? Give feedback.
-
Ok. I found `STBI_THREAD_LOCAL' to look promising and after defining it it didn't link libpthread. It seems to work. So the question to dev - is that the right way to control it? |
Beta Was this translation helpful? Give feedback.
-
For the benefit of everyone reading this or having the problem I made a ticket report in mingw-w64. Maybe they will do something with it. Hopefully. |
Beta Was this translation helpful? Give feedback.
-
I have simple question - how to NOT use threads? Mingw keeps linking to `libwinpthread-1.dll' despite me not using threads and not intending to. Also I want to check speed with single processor so I want to know how to avoid it.
In Linux it doesn't link to `libpthreads.so' at all, as I would expect, so it's even stranger.
Beta Was this translation helpful? Give feedback.
All reactions