Problem with the ElasticPPCPP example

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

Moderators: silvia, selimgunay, Moderators

Post Reply
mgray
Posts: 1
Joined: Wed Jun 15, 2011 10:26 am
Location: University of Toronto

Problem with the ElasticPPCPP example

Post by mgray » Thu Dec 22, 2011 1:30 pm

Hello,

I am an OpenSees user who is trying to create a new material for the first time. I am starting by working through the ElasticPPCPP example and I've run into a snag. I am using Visual Studio 2010 for the first time to create the dll. I find that the file compiles at step 20 which seemed odd to me. When I copy the resulting dll file to my folder containing the example1.tcl and my OpenSees executable (I'm running v.2.3.1) and run the example file, I get the message "WARNING could not create uniaxialMaterial ElasticPPcpp".

If I try to continue the instructions (up to step 24), Visual Studio fails to compile the files and I get the following messages:

error LNK2005:_DLMain@12 already defined in win32Functions.obj (the associated files is mfcs100ud.lib)
error LNK1169: one or more multiply defined symbols found (the associated files is ElasticPPCPP.dll)

Is my first problem an issue with the version of OpenSees that I'm trying to use to run the example file? I know that the instructions call for v.2.2.0? I'm kind of lost here and all I really want to do is edit the source code for an existing material and make a new material for me to play with in my analyses.

Any help would be greatly appreciated!

linguan118
Posts: 140
Joined: Sun Oct 03, 2010 11:36 pm
Location: Hong Kong

Re: Problem with the ElasticPPCPP example

Post by linguan118 » Mon Jan 02, 2012 5:48 pm

Your version of Visual Studio?
Research Assistant Professor, The Hong Kong Polytechnic University
guanlin@polyu.edu.hk

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

Re: Problem with the ElasticPPCPP example

Post by duguyihan » Wed Mar 14, 2018 6:17 pm

I'm facing the same problem. Did you solve it out? (Win10 64bit, visual studio 2017, 2.5.0)

1>dllmain.cpp
1>win32Functions.obj : error LNK2005: _DllMain@12 already defined in win32Functions.obj
1> Creating library E:\OpenseesSecondary\source code\DEVELOPER\material\cpp\ElasticPPcpp\Release\ElasticPPcpp.lib and object E:\OpenseesSecondary\source code\DEVELOPER\material\cpp\ElasticPPcpp\Release\ElasticPPcpp.exp
1>E:\OpenseesSecondary\source code\DEVELOPER\material\cpp\ElasticPPcpp\Release\ElasticPPcpp.dll : fatal error LNK1169: one or more multiply defined symbols found
1>Done building project "ElasticPPcpp.vcxproj" -- FAILED.
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

Post Reply