One dll is created. Then...

For developers writing C++, Fortran, Java, code who have questions or comments to make.

Moderators: silvia, selimgunay, Moderators

Post Reply
mehdikia2519
Posts: 39
Joined: Sun Apr 19, 2009 12:03 am
Location: Iran

One dll is created. Then...

Post by mehdikia2519 »

Dear Frank,
I followed the instructions that you gave me in my last post. Here is what I did step by step:
1. I went to the folder OpenSees\Package\win32 and found the file "WindowsDLLs.SLN" which is the solution file that you stated.

2. I opened it using visualC++ 2008 and there were 6 projects in there namely 1.elasticPPc 2.elasticPPcPP 3.minPackageC 4.minPackageCPP 5.TrussC and 6.TrussCPP

3. I started out building individual projects (chronologically from 1st to 6th project) and one dll file (which is elasticPPC.dll ) is created in Folder \package\newMaterial\c\.

First off, why just 1 dll is created and what happened to the dll for the element? Do I have to follow and order in building those 6 projects or is there anything else I should do?

Secondly, once I have these dlls, what should I do next? how can I use these dlls and where should I put them to have my exe file affected? I am asking this last question due to another unsuccessful linking that I encountered and "could not creat uniaxialMaterial ElasticPPcpp" poped out again.

Thanks in advance. I really appreciate your help.
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Post by fmk »

for now, put the OpenSees.exe, the .dll and the example script in the same directory. the .dll will be located in the element directory.
mehdikia2519
Posts: 39
Joined: Sun Apr 19, 2009 12:03 am
Location: Iran

Post by mehdikia2519 »

I successfully created all necessary dlls and worked with trusscpp and elasticPP. There is a particular order though as I thought. As you said when dlls are in the same directory, OpenSees recognizes the new material and element. I will shortly right a step by step procedure and post it for those who want to use Frank's file without any problem.
Now the primary question remains; how can I develop my own element? The first thing which occurs to mind is (also Frank said) changing trussCPP.cpp and its header file gradually in WindowsDLLs.sln. Shall I make my changes here in WindowsDLLs.sln? would TrussCPP.h and TrussCPP.cpp only be subject of my changes or shall I change other files here?
Would it be possible to add my own cpp and h files to this solution file or I 'd rather stick to changing your files fmk?

Thnaks
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Post by fmk »

i suggest you start with mine and modify it gradually until it becomes yours. creating .dll from scratch is not something you want to do unless you know vc very well.
mehdikia2519
Posts: 39
Joined: Sun Apr 19, 2009 12:03 am
Location: Iran

Post by mehdikia2519 »

Thanks,
My colleague and I got the dll by gradually changing your files. It is all set. We are working on final preparation of the files and finding possible errors and mistakes regarding our element. But I have not changed the element name yet. Its still trussCpp. I am working on it. After finalizing .cpp and .h files, we will send them to you to have our contribution to OpenSees.
Thanks a lot Frank,
Zephyre
Posts: 10
Joined: Tue Sep 22, 2009 10:26 am
Location: UMD

Post by Zephyre »

Hi Frank, I've created the dll and have it together with scrip and Opensees exe file in one folder and I'm running example1. It runs the script but give an error at end which is because of "print ele" command in example1.tcl because when I deactivate it, the program runs without a problem. It gives a debug error which say that" the value of EPS was not properly saved during function call. Is there any error in c++ ElasticPPcpp project that we can't print material properties of element?
Thanks!
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Post by fmk »

can you be a bit more specific about which file you are using and were you obtained it.
Zephyre
Posts: 10
Joined: Tue Sep 22, 2009 10:26 am
Location: UMD

Post by Zephyre »

I downloaded the source code from Opensees website a couple weeks ago and the WindowsDlls file and example1.tcl are all in the PACKAGES folder. The same problem exists when trying the script that tests the TrussCpp element. Has anybody else reported such a problem? I think I do everything correctly.
Thanks for your help!
Thanks!
Post Reply