Linking Errors in VC++

Forum for OpenSees users to post questions, comments, etc. on the use of the OpenSees interpreter, OpenSees.exe

Moderators: silvia, selimgunay, Moderators

Post Reply
cearl
Posts: 2
Joined: Mon Jan 09, 2006 2:59 pm
Location: Utah State University

Linking Errors in VC++

Post by cearl »

I am trying to compile the newest stable version in windows, but with one additional user element, Isolator2spring. The element was created in Linux and executes perfectly there. The stable release without the new element works on my Windows machine but when I insert the new element and make all the necessary changes I still get a linking error:

Code: Select all

Linking...
material.lib(TclModelBuilderSectionCommand.obj) : error LNK2001: unresolved external symbol "public: __thiscall Isolator2spring::Isolator2spring(int,double,double,double,double,double,double,double,double)" (??0Isolator2spring@@QAE@HNNNNNNNN@Z)

..\..\bin\openSees.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

openSees.exe - 2 error(s), 0 warning(s)
I've triple checked my code and can't find anything inconsistent, perhaps there is a library I should be including and don't know about?

If the code works in Linux with the new element, works in Windows without the new element, and with the new element it compiles without errors, why would it have trouble linking?

Is there some Linux specific C++ commands that would allow the program to work in Linux and not in Windows or is there some additional library that should be included when compiling in windows?

Does anyone have any insight??
dhshin
Posts: 5
Joined: Fri Nov 04, 2005 4:20 pm
Location: Seattle, WA

How do you compile your codes ?

Post by dhshin »

I have similar experience. But in my case I recognized that I tried to complie the codes without turning off opensees.exe. When I turned it off, I could succeed in compiling without any error like yours.

Of course there can be another possibility for that error.
Anyway why don't you try it? :)
cearl
Posts: 2
Joined: Mon Jan 09, 2006 2:59 pm
Location: Utah State University

Post by cearl »

I haven't been able to successfully create opensees.exe yet because of this linking error, thanks for the input though.

Can you think of anything else it could be?
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Post by fmk »

you have to add the IsolatorSpring.cpp material file to the project.
Post Reply