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 » Mon Feb 27, 2017 4:34 pm

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 » Mon Feb 27, 2017 4:44 pm

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 » Mon Feb 27, 2017 6:38 pm

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 » Mon Feb 27, 2017 10:16 pm

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 » Wed Mar 01, 2017 12:10 am

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 » Wed Mar 01, 2017 5:22 am

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 » Thu Mar 02, 2017 1:46 am

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 » Tue Mar 07, 2017 5:45 am

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 » Thu Apr 05, 2018 7:04 pm

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