The file .dll can not be used by the opensees.exe

Forum for OpenSees users to post questions, comments, etc. on the use of the OpenSees interpreter, OpenSees.exe

Moderators: silvia, selimgunay, Moderators

Post Reply
liuxing08
Posts: 14
Joined: Tue Sep 04, 2012 6:37 pm
Location: Tsinghua University

The file .dll can not be used by the opensees.exe

Post by liuxing08 »

I followed the instructions of "Adding your code to Opensees" to build a .dll on a Windows Machine with Visual Studio 2010 Installed. the dll file has been compiled successfully. But it can't be used by Opensees.exe. The screen printed "can not create the material". Has anyone met the same problem? Did I miss some important things when building the DLL file?
liuxing08
Posts: 14
Joined: Tue Sep 04, 2012 6:37 pm
Location: Tsinghua University

Re: The file .dll can not be used by the opensees.exe

Post by liuxing08 »

My OS is window 7 and 64 version.
liuxing08
Posts: 14
Joined: Tue Sep 04, 2012 6:37 pm
Location: Tsinghua University

Re: The file .dll can not be used by the opensees.exe

Post by liuxing08 »

I have found the bugs. I didn't add the #ifdef _USRDLL.....
TOKYOTech
Posts: 22
Joined: Tue Feb 23, 2016 9:51 pm
Location: Tokyo Institute of Technology

Re: The file .dll can not be used by the opensees.exe

Post by TOKYOTech »

If you get your cpp file from the opensees souce code, you should also add this-> before the parameters in the getCopy part. The transmit of parameters may go wrong if you dont do so, at least it happens in my file
liuxing08
Posts: 14
Joined: Tue Sep 04, 2012 6:37 pm
Location: Tsinghua University

Re: The file .dll can not be used by the opensees.exe

Post by liuxing08 »

I have successfully built a DLL file. But I found another problem. I built the DLL file in my computer and it works in my computer. When I copied the DLL to another computer which is used for large computation, the opensees.exe can't create the material, that is the DLL file could not be used. The other computer is also window 7 and 64 version, but without Visual studio 2010. Has anyone met the same problem?
liuxing08
Posts: 14
Joined: Tue Sep 04, 2012 6:37 pm
Location: Tsinghua University

Re: The file .dll can not be used by the opensees.exe

Post by liuxing08 »

Me again. I found that the other computer missed a msvcr100d.dll. So I copied it from the successful computer to the other one. But I also download the software 360 safety guard to repair 'the msvc**.dll file missing'(文件修复), which can be found in the manual service(人工服务). So this problem has been solved. Thanks.
Sudan
Posts: 8
Joined: Wed Aug 10, 2016 9:14 am

Re: The file .dll can not be used by the opensees.exe

Post by Sudan »

No problem for my dll file to run on another computer.
Did you build on debug version or release version?
fmk recommend to build on release version to share on another computer.
liuxing08
Posts: 14
Joined: Tue Sep 04, 2012 6:37 pm
Location: Tsinghua University

Re: The file .dll can not be used by the opensees.exe

Post by liuxing08 »

Sudan wrote:
> No problem for my dll file to run on another computer.
> Did you build on debug version or release version?
> fmk recommend to build on release version to share on another computer.


Thanks, it works!!!
duguyihan
Posts: 13
Joined: Wed Dec 02, 2015 4:05 am
Location: Hunan University

Re: The file .dll can not be used by the opensees.exe

Post by duguyihan »

I face the same problem, still need help!
I get the compiled dll file, but it seems the OpenSees.exe doesn't know its existence and just return "WARNING could not create uniaxialMaterial ElatsticPPcpp".

The OS is win7 64bit. Both 32bit and 64bit release of the dll files and corresponding Opensees.exe were tried. No missing the problem of missing #ifdef _USRDLLlosing "".
Post Reply