On 06/28/2017 04:20 AM, Dan Wilcox wrote:2. I did run into a missing pthread error after building which was fixed with the following in the mingw platform section of the configure.ac
# statically link pthread into the exe, otherwise we get a missing dll error
LIBS="-Wl,-Bstatic -static $LIBS -Wl,-Bdynamic"
but that links in *all* libraries statically (not just pthreads).
It shouldn't as static is set, then pthread linked, then dynamic reset afterwards. In any case, it's probably not needed and the issue I ran into is more related to the Msys2 / MinGW setup I put together.
iirc, a number of externals rely on Pd providing things like pthreadVC.dll.
so if we have to provide a few dlls anyhow, i don't see much merit in
static linking.
e.g. this fixed the runtime problem for me:
cp /usr/i686-w64-mingw32/lib/libwinpthread-1.dll bin/
My static linking fix worked for me but I can definitely see issues for externals. We need to then find the dll & copy it to the pd/bin folder programmatically with autoconfi/automake...