WindowsDLLs Build Error

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

Moderators: silvia, selimgunay, Moderators

Post Reply
careybd
Posts: 2
Joined: Mon Oct 05, 2009 10:26 pm
Location: Lafayette College

WindowsDLLs Build Error

Post by careybd »

Hello,
I am trying to compile the windows dll project for the first time and I am getting the following error message:


minPackageCPP.lib(UniaxialMaterial.obj) : error LNK2019: unresolved external symbol __imp__strtok referenced in function "public: virtual class Response * __thiscall UniaxialMaterial::setResponse(char const * *,int,class OPS_Stream &)" (?setResponse@UniaxialMaterial@@UAEPAVResponse@@PAPBDHAAVOPS_Stream@@@Z)
./ElasticPPcpp.dll : fatal error LNK1120: 1 unresolved externals

I am assuming this is easily fixed but I cannot figure out whats wrong. Thanks for any help.
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Post by fmk »

i have never seen this error.
rjaeger
Posts: 102
Joined: Thu Aug 31, 2006 9:57 pm
Location: UC Davis

Post by rjaeger »

Hi Frank,

I'm having a similar issue with minPackage.lib when trying to compile the trussCPP dll example. I downloaded the stable source code this morning from the developer download link. I'm compiling on Windows Vista with Visual C++ Express 2008.

1>Linking...
1>LINK : fatal error LNK1181: cannot open input file 'minPackageCPP.lib'

Is this library supposed to be created when compiling OpenSees? If so, it does not appear in my /lib/debug or /lib/release directories.

~~~~~~~~~~~~~~~~~~~

Ok figured it out now. There is a project in OpenSees\PACKAGES\win32 that builds the necessary lib files for making the dlls.

Frank, could you add this to the wiki tutorial at opensees.berkeley.edu/wiki/index.php/Add_a_New_Element_C%2B%2B in case anyone else runs into this?

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

Post by fmk »

robbie,

i am no longer using the code in PACKAGES, .. it still works, but i have set up an easier way to do it and that it was i am now documenting .. the element code is the same and there are instructions on how to build the DLL which seem to be understandable based on comments that have come back in forums. the documentation can be found here:

[url]
http://opensees.berkeley.edu/wiki/index ... _Developer
[/url]
rjaeger
Posts: 102
Joined: Thu Aug 31, 2006 9:57 pm
Location: UC Davis

Post by rjaeger »

Hi Frank,

Thanks for replying so quickly. I took a look around the forums and wiki and found that people had success with files in the tarball opensees.berkeley.edu/OpenSees/code/OpenSeesDeveloper.tar.gz . Unfortunately, the link is not working. If I want to create an element dll, can I get the necessary files by checking out the current SVN? If they are available, can you tell me the paths to the right files since you mention the code in PACKAGES is not being used anymore?

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

Post by fmk »

robbie,

sorry about the delay. should be up now.
rjaeger
Posts: 102
Joined: Thu Aug 31, 2006 9:57 pm
Location: UC Davis

Post by rjaeger »

Hi Frank,

It's no problem. Thank you for getting the link repaired.

Thanks again,
Robbie
talledo.diego
Posts: 20
Joined: Sat Jun 27, 2009 2:59 am
Location: IUAV - Venice

Error compiling windows dll

Post by talledo.diego »

Hi frank.
I'm trying to compile a windows dll like example in wiki.
I followed all 24 points in your tutorial. But there is one error during compiling:

[code]
win32Functions.cpp
c:\users\diego\openseesdeveloper\core\win32functions.cpp(70) : error C2086: 'OPS_GetNodeInfoPtrType __cdecl OPS_GetNodeDispFunct' : redefinition
c:\users\diego\openseesdeveloper\core\win32functions.cpp(69) : see declaration of 'OPS_GetNodeDispFunct'
c:\users\diego\openseesdeveloper\core\win32functions.cpp(71) : error C2086: 'OPS_GetNodeInfoPtrType __cdecl OPS_GetNodeDispFunct' : redefinition
c:\users\diego\openseesdeveloper\core\win32functions.cpp(69) : see declaration of 'OPS_GetNodeDispFunct'
c:\users\diego\openseesdeveloper\core\win32functions.cpp(74) : error C2146: syntax error : missing ',' before identifier 'OPS_GetNodeInfoPtrType'
Generating Code...

Results


Build log was saved at "file://c:\Users\Diego\OpenSeesDeveloper\material\ElasticPPCPP\Debug\BuildLog.htm"
ElasticPPCPP - 3 error(s), 49 warning(s)
[\code]

I changed file win32functions.cpp to solve the problem, (deleted lines 70 and 71 and added comma at line 74).
I think it's correct.
I hope it can help somebody to solve future problem.
Diego Alejandro Talledo
victoria belloni
Posts: 1
Joined: Tue Oct 05, 2010 2:39 am
Location: Georgetown
Contact:

Post by victoria belloni »

i have never seen this error.
talledo.diego
Posts: 20
Joined: Sat Jun 27, 2009 2:59 am
Location: IUAV - Venice

Post by talledo.diego »

[quote="victoria belloni"]i have never seen this error.[/quote]
maybe the source is correct now. But when I wrote this message I had just downloaded the file and there was this error. :-)
Diego Alejandro Talledo
Post Reply