-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
C++ externals fail on Windows #41
Comments
hmm: putting the the other way round (making Pd symbols available to externals) needs to do the same (but it already does). |
Some Tests not using pd-lib-builder:I was able to finish compile of PDContainer (sources from extended (cpp)) against Millers's 0.48-1. But I'm unable to load it (same trouble as @katjav) but I'm on win8.1 so I get some clue from the OS popup: Edit1 : So I tried compiling against my Msys2 build of 0.48-1. But I get the same errors. |
Today I booted an ancient XP box with Pd-extended 0.42 installed and an old pdlibbuilder. Similar issue there but the system gave a clue: Currently I don't have access to the Windows 64 box I was using yesterday but I guess the same option would make it work there. |
So, pdlibbuilder has never worked for C++ on Windows? This pd-list message may point to the same issue although it isn't specific: https://lists.puredata.info/pipermail/pd-list/2016-11/116972.html Would any C++ class for Pd need the C lib just because of the |
I was able to de-mess the thing. In my case So now I get the [external] loaded and running. I was able to detect this using http://www.dependencywalker.com/ it showed that There is some search order for deps in windows. 1 same dir as the calling dll These are all the These are the flags from the original Makefile.
I'm unable to translate by myself this Makefile to be used with pd-lib-builder. It's a single binary from many sources. |
I was able to get rid of the deps adding
|
Good NewsI've transported the It would be nice to get rid of "libwinpthread-1.dll" but this is not happening "out-of-the-box" with MinGW64. Details so far on #36 |
I have reopened #36 because is orthogonal to this: ie static linking. |
Summarizing what we found so far:
Because of issue 2 pdlibbuilder already links standard libraries statically:
I was hoping that we could get rid of these binary code duplicates in the future if vanilla Pd could provide .dlls for standard libs. But at least for the moment it rather seems that we have to build more duplicate code into externals, that is: standard C libs into C++ objects, to solve the first issue. |
Windows "pristine" machines does not have any of those dlls. The incompatibility comes when some older software had installed those dlls on global folders.
Recent (since a couple of years) Pds for windows were compiled using static C and C++ libs to avoid this issue so Pd don't ship those. The New Coming Pd (is very most likely to get merged) also use static libs: You will be very happy to read the latests news on this same PR: pure-data/pure-data#299 Summarizing |
Commit f1b0e3c adds |
indirectly related, i found that statically linking libc/libstdc++ will give serious troubles when using exceptions. |
just taking @katjav's comment in #39 to a new issue:
The text was updated successfully, but these errors were encountered: