People may find this puzzling. Sirbomber sent me a DLL with the stated problem. I verified the problem. He sent me the source code used to make this DLL, and I compiled it myself (after a few slight changes to adjust it to my environment), and it runs perfectly. I sent him back my slight changes so he could try them in his environment, and it still has the said problem.
I used DevStudio/MSVC++ 6.0. Sirbomber used CodeBlocks/MSVC++ ? (whatever version the packaged contained).
Btw, if you have something like this:
struct
{
Trigger someTrigger;
// ...
} saveData;
It won't compile with MSVC++ 6.0. It gives a warning about the anonymous struct. It seems that the struct needs a name for the compiler to provide a default constructor. I suppose this has to do with name mangling and linking. Anyways, since Trigger has a non-trivial constructor, any struct that contains it also must have a non-trivial constructor. Thus, for the compiler (version 6.0) to provided the needed default constructor, you need to name the struct.
struct SaveData
{
Trigger someTrigger;
// ...
} saveData;
Note the "SaveData" after the "struct" keyword.
Of course this change didn't solve the problem. It only allowed it to compile under an older version of the compiler. My next best guess is perhaps a faulty support library. We played around with LibCTiny, but that had no effect on the problem. I suppose it did use other libraries though. I noticed a reference to IUnit, and OP2Helper. Maybe check if you're using an up to date version of IUnit, and it's corresponding .lib file. If that's not it, then maybe some strange extension to OP2Helper? I don't recall anything in there that should cause a problem like this though. Failing all that, it could also be some obscure compiler flag or something. Or perhaps even a compiler bug.
Of course this is assuming that binaries created with one version of the compiler will still work with binaries created with another version of the same compiler. I suppose it's possibly they could have changed a calling convention.