can't find DLL (my own I've written) ***UPDATE: Resolved

So I’ve written most of my game core as an external DLL, I compile the .exe and it runs just fine on my computer, but when I migrate it to a different computer for testing purposes it says it can’t load my DLL

I copied it into the same directory as the .exe, and I’ve also tried mimicking the dir structure of blender and copying it to where blender normally goes for externally written modules, but it’s not working at all.

Do I need to have it import it differently? for now the call to import it is simply

import mydll

(to clarify, I’m not talking about the standard blender “python24.dll”, “SDL.dll”, etc…)

Did you make the dll with c++? If you did you have to make a wrapper for it. The import statement in Blender is for python modules. They are written in python and end in .py or apparently .pyd for windows dlls. Try swig for making a wrapper. I guess that’s supposed to be the easiest. There is also SIP. I’ve never done it, though, so this is all hear say.

I’m using boost. It works fine on this comp, but not when I move to a different computer. I believe I’m missing some sort of redist dll, I’m still researching it.

boost is pretty cool. Let us know about your solution.

No luck whatsoever. Works flawlessly on this computer (my desktop).

  • on my wife’s laptop it says it can’t load the module, crashes outright
  • on my laptop it says “DLL load failed”, it loads my scene but of course won’t respond to anything requiring the scripts which import my DLLI’m sure it has something to do with either the project setup, or I’m missing a redistributable DLL someplace.

What my project consists of is that I’m compiling a C++ DLL in MS Visual Studio 2005 with “Boost” libraries to make it communicate with python. It works flawlessly in Blender, and in my compiled .exe on this comp.

What about a path problem? Are you specifying an absolute path anywhere? I really doubt there is a redist thing going on.
Also the visual studio thing rings a bell. You’ll find the difference in those other computers is that they don’t have visual studio I would hazard a guess. I think there is a file needed or something like that. I can almost remember it but not quite.

nope, no absolute paths. I double checked on this computer by removing the files from the dir of the .exe and it no longer worked so it’s looking in the same directory as the executable.

and on my laptop, it did have visual studio, but not 2005. I’m installing 2005 on it now so if it works after I install VS2005 I’ll know that it has something to do with that.

Did you do a release version?

no, it was compiled in debug - that is something I haven’t tried though…could give it a shot.

And as an update, after I installed VS2005 on my laptop, it magically worked - so I’m missing something having to do with visual studio…now to track it down…

It works!

I was on my way to bed and had a random epiphany…it’s obviously a visual studio dependency problem soo…make an installer.

So I spent 30 seconds setting up an installer, and voila!

My blender game has the core of it’s functionality in C++, and blender handles the UI :smiley:

Great. Of course, it’s now not cross platform, but as long as it works for you.

I’ll probably look for a workaround to make it cross-platform later, important thing for now is that it works so that I can go ahead and begin implementing the AI and networking stuff and we can begin testing.