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 »

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 »

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 »

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 »

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 »

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 »

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 »

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 »

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