ElasticPPcpp dll compiled but failed to run in OpenSees

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

Moderators: silvia, selimgunay, Moderators

canjunli
Posts: 5
Joined: Sat Sep 26, 2015 12:09 am
Location: Southeast University

Re: ElasticPPcpp dll compiled but failed to run in OpenSees

Post by canjunli » Tue Dec 15, 2015 4:26 am

I am also building a DLL for ElasticPPcpp as demonstrated in the example with the latest Developer in Visual Studio 2012.

I copied the 'EigenSOE.h' from the OpenSees/src/system_of_eqn/eigenSOE/EigenSOE.h and the 'bool.h' from the OpenSees/src/
to the opensees/developer/core.

But there is an error messages:
c:\users\administrator\desktop\opensees svn\developer\core\win32functions.cpp(215): error C2733: “ops_getstring”:
c:\users\administrator\desktop\opensees svn\developer\core\elementapi.h(145) :


I don't know how to solve it, and hope you can give me advice!

Sanjeema
Posts: 14
Joined: Tue Nov 17, 2015 4:37 am
Location: Tokyo Institute of Technology

Re: ElasticPPcpp dll compiled but failed to run in OpenSees

Post by Sanjeema » Tue Dec 15, 2015 8:57 pm

Hi,

Thank you so much for helping me around. I have a few more questions. When you compiled the dll, did it give you any problem with the win32functions.cpp file? I got the following error.

Error 2 error C2733: second C linkage of overloaded function 'ops_getstring' not allowed i:\2015\c plus plus practice\3_elasticppcpp with new developer\developer\core\win32functions.cpp 217

So, I used older win32functions.cpp file. And, it didn't give any error.So, basically, I'm using all the new core files except the win32functions.cpp; don't know how appropriate/inappropriate that is.

By the way, I used the OpenSees.exe 32-bit, version 2.4.6 . It read the ElasticPPcpp.dll but gave some errors. I had an older version 2.4.0 of the 32-bit OpenSees.exe, which gave the output just as demonstrated in the example. Did you also have similar problems? Which version of OpenSees are you using?

Sanjeema

canjunli
Posts: 5
Joined: Sat Sep 26, 2015 12:09 am
Location: Southeast University

Re: ElasticPPcpp dll compiled but failed to run in OpenSees

Post by canjunli » Tue Dec 15, 2015 9:22 pm

Hi
I want to know the older version number so that I can use corresponding win32Functions.cpp.
Hope your advice!

Sanjeema
Posts: 14
Joined: Tue Nov 17, 2015 4:37 am
Location: Tokyo Institute of Technology

Re: ElasticPPcpp dll compiled but failed to run in OpenSees

Post by Sanjeema » Wed Dec 16, 2015 2:47 am

Hi,

You can use the win32functions.cpp available in the OpenSees/trunk website, not the downloaded one from svn. Go through browse source code.

canjunli
Posts: 5
Joined: Sat Sep 26, 2015 12:09 am
Location: Southeast University

Re: ElasticPPcpp dll compiled but failed to run in OpenSees

Post by canjunli » Thu Dec 17, 2015 6:10 pm

Instead of downloading the older version of win32functions.cpp, I changed the name of ops_getstring into ops_getstringModified .So, avoiding the problem of overloading,I could compile the ElasticPPcpp successfully.

mtsonicc
Posts: 55
Joined: Wed Mar 14, 2012 6:27 pm
Location: Hanyang University

Re: ElasticPPcpp dll compiled but failed to run in OpenSees

Post by mtsonicc » Fri Dec 18, 2015 7:18 am

Dear Sanjeema,

The first time i successfully compiled ElasticPP.dll was about an year ago. at that time, win32functions.cpp had no problem.

but when I tried compiling same example with the newest svn, it gave me same error as yours. (related with 'win32functions.cpp')

I think there are some problems with the newest "win32functions"...

canjunli
Posts: 5
Joined: Sat Sep 26, 2015 12:09 am
Location: Southeast University

Re: ElasticPPcpp dll compiled but failed to run in OpenSees

Post by canjunli » Fri Dec 18, 2015 7:01 pm

The newest opensees SVN do have some differences from the older one. Developer ,the sub-directory , loses some header files and source files. Also, the win32functions.cpp have some problems , such as the function of ops_getstring is overloading.

AnggaSetiawan
Posts: 15
Joined: Tue Apr 07, 2015 10:17 pm
Location: Kyoto University

Re: ElasticPPcpp dll compiled but failed to run in OpenSees

Post by AnggaSetiawan » Sat Jun 04, 2016 5:53 am

Dear Canjunili

You can see the topic "How to add a new material model into OpenSees?". And I have download the file update and I put it in ; https://drive.google.com/open?id=0Bzu3T ... nR0NG5fZlk . It work when I make compilation by VStudio2013 and VStudio2015 in win64 bit.

Regards

Post Reply