Windows Linking Help

EDIT: TL;DR -> static constructors, dll load order, and STL cleverness can blow you up. I have solved this problem. Thanks for looking.

The reason MyThing::bar is undefined is because the method is inline. That shouldn’t be a problem because any source code that uses it will simply inline it (or compile it statically into the current compilation unit, the compiler’s choice), so the method can still be used. This means that the symbol doesn’t need to be present at all (defined or undefined), but the compiler does anyway for whatever reason (probably some requirement for class linking symantics).

So I don’t think those “U” symbols are the problem.

OK! Yes obviously it is visible and like I said the same code on mac and windows works. So the undefined symbol is a red herring I guess?

So perhaps my bigger question is “if my .dll doesn’t load with error 1114 which is DLL failed to initialize do you have any tips at all on how to debug that”? I don’t quite even know where to begin poking around since you haven’t even entered my code when the error pops up.


Oh and: the reason I thought maybe it was an export problem is because on mac and linux my symbols don’t appear in “ U “ list in nm; the only symbols which are not linked are the rack symbols (obviously) and things from stdlib. So windows is definitely acting “differently” in a few ways I don’t quite get.