Building v.2.4.4

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

Moderators: silvia, selimgunay, Moderators

Post Reply
yangdawei
Posts: 7
Joined: Mon Apr 14, 2014 10:18 pm
Location: harbin institute of technology

Building v.2.4.4

Post by yangdawei »

OS: Windows 8
tcl: 8.5.10.1.296777
Microsoft Visual C ++ 2010 Ultimate

Is there someone please help me to solve linker problem? As I tried to compile project such as quickMain, openSeesTk, openSees, the typical linker errors showed:

Error 4 error LNK2019: unresolved external symbol _errno referenced in function _for__open_proc. D:\Developer\OpenSees\Win32\proj\quickMain\libifcore.lib(for_nt_open_proc.obj) quickMain
Error 3 error LNK2019: unresolved external symbol __pxcptinfoptrs referenced in function _GETEXCEPTIONPTRSQQ D:\Developer\OpenSees\Win32\proj\quickMain\libifcore.lib(for_init.obj) quickMain
Error 2 error LNK2019: unresolved external symbol "public: virtual __thiscall StandardStream::~StandardStream(void)" (??1StandardStream@@UAE@XZ) referenced in function "void __cdecl `dynamic atexit destructor for 'sserr''(void)" (??__Fsserr@@YAXXZ) D:\Developer\OpenSees\Win32\proj\quickMain\main.obj quickMain
Error 1 error LNK2019: unresolved external symbol "public: __thiscall StandardStream::StandardStream(int)" (??0StandardStream@@QAE@H@Z) referenced in function "void __cdecl `dynamic initializer for 'sserr''(void)" (??__Esserr@@YAXXZ) D:\Developer\OpenSees\Win32\proj\quickMain\main.obj quickMain
Error 5 error LNK2001: unresolved external symbol _errno D:\Developer\OpenSees\Win32\proj\quickMain\libifcore.lib(for_portlib.obj) quickMain
Error 6 error LNK2001: unresolved external symbol _errno D:\Developer\OpenSees\Win32\proj\quickMain\libm.lib(libm_error.obj) quickMain
Error 7 error LNK1120: 4 unresolved externals D:\Developer\OpenSees\Win32\bin\quickMain.exe quickMain

Please help me, thank you!
yangdawei
Posts: 7
Joined: Mon Apr 14, 2014 10:18 pm
Location: harbin institute of technology

Re: Building v.2.4.4

Post by yangdawei »

yangdawei wrote:
> OS: Windows 8
> tcl: 8.5.10.1.296777
> Microsoft Visual C ++ 2010 Ultimate
>
> Is there someone please help me to solve linker problem? As I tried to
> compile project such as quickMain, openSeesTk, openSees, the typical linker
> errors showed:
>
> Error 4 error LNK2019: unresolved external symbol _errno referenced in
> function
> _for__open_proc. D:\Developer\OpenSees\Win32\proj\quickMain\libifcore.lib(for_nt_open_proc.obj) quickMain
> Error 3 error LNK2019: unresolved external symbol __pxcptinfoptrs
> referenced in function


I got the answer as followed:
1. tcl installed for opensees should be 32-bit but not 64-bit.
2. vs2010 has bug on opening solution of 'opensees', so I adopt vs2012 open it and build succeeded.
3. openseesvc6 shoud not be build by non-vc++6.0.
hamidreza
Posts: 8
Joined: Wed Nov 12, 2008 12:06 am
Location: University of Utah

Re: Building v.2.4.4

Post by hamidreza »

Hello,
I get the following errors when I build the OpenSees.sln in trunk/win32.
I use Visual Studio 2012 and tcl/tk 8.5.14 for 32 bit systems.
I wonder if anyone have any idea in this regard.

bests,
Hamid



Error 1633 error LNK2019: unresolved external symbol "void * __cdecl OPS_ConcreteSakaiKawashima(void)" (?OPS_ConcreteSakaiKawashima@@YAPAXXZ) referenced in function "int __cdecl TclModelBuilderUniaxialMaterialCommand(void *,struct Tcl_Interp *,int,char const * *,class Domain *)" (?TclModelBuilderUniaxialMaterialCommand@@YAHPAXPAUTcl_Interp@@HPAPBDPAVDomain@@@Z) C:\Users\h.sarmadi\Desktop\trunk\Win32\proj\openSeesTk\material.lib(TclModelBuilderUniaxialMaterialCommand.obj) OpenSeesTk

Error 1634 error LNK1120: 1 unresolved externals C:\Users\h.sarmadi\Desktop\trunk\Win32\bin\openSeesTk.exe OpenSeesTk

Error 1629 error LNK2019: unresolved external symbol "void * __cdecl OPS_ConcreteSakaiKawashima(void)" (?OPS_ConcreteSakaiKawashima@@YAPAXXZ) referenced in function "int __cdecl TclModelBuilderUniaxialMaterialCommand(void *,struct Tcl_Interp *,int,char const * *,class Domain *)" (?TclModelBuilderUniaxialMaterialCommand@@YAHPAXPAUTcl_Interp@@HPAPBDPAVDomain@@@Z) C:\Users\h.sarmadi\Desktop\trunk\Win32\proj\openSees\material.lib(TclModelBuilderUniaxialMaterialCommand.obj) OpenSees

Error 1630 error LNK1120: 1 unresolved externals C:\Users\h.sarmadi\Desktop\trunk\Win32\bin\openSees.exe OpenSees
hrs
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Re: Building v.2.4.4

Post by fmk »

did you get the revision corresponding to the release?

http://opensees.berkeley.edu/OpenSees/developer/svn.php

you want 5764

and ignore the errors with quickMain, that project won't compile, the others do.
blaiman
Posts: 56
Joined: Wed Jul 11, 2012 11:59 am
Location: RISA Tech, Inc.

Re: Building v.2.4.4

Post by blaiman »

I guess I've been running into the same problems as the guys before me in this post... even with the check out of the 5764 version. Mainly, the message I've been having a hard time (and the only error message really) is this:

Error 7 error LNK2019: unresolved external symbol "void * __cdecl OPS_DoddRestr(void)" (?OPS_DoddRestr@@YAPAXXZ) referenced in function "int __cdecl TclModelBuilderUniaxialMaterialCommand(void *,struct Tcl_Interp *,int,char const * *,class Domain *)" (?TclModelBuilderUniaxialMaterialCommand@@YAHPAXPAUTcl_Interp@@HPAPBDPAVDomain@@@Z) C:\OpenSees_Lanning\Win32\proj\openSees\material.lib(TclModelBuilderUniaxialMaterialCommand.obj)

It's obviously based off the material library but I don't know exactly what's going on with this specific class which is giving the complete build to compile without any errors. Any help/suggestions/solutions would be great, thanks!
Brighton Laiman
Development Engineer
RISA Technologies
Foothill Ranch, CA
blaiman
Posts: 56
Joined: Wed Jul 11, 2012 11:59 am
Location: RISA Tech, Inc.

Re: Building v.2.4.4

Post by blaiman »

I fixed the problem. Simply just commented out the "DoddRestr" class calls and it builds perfectly fine now.
Brighton Laiman
Development Engineer
RISA Technologies
Foothill Ranch, CA
giuseppe.abbiati
Posts: 11
Joined: Mon Jan 24, 2011 7:09 am
Location: Università di Trento

Re: Building v.2.4.4

Post by giuseppe.abbiati »

Hello,
I encountered a very similar issue. I'm trying to compile OpenSEES rev. 5835 with Visual Studio 2010. First, I installed 32bit versions of both TCL and OpenSSL. Then, I opened OpenSeesVC6.sln and I added 'lib' and 'include' folders to the 'opensees' startup project. Nevertheless, the compiling failed and the error follows:

5>------ Rebuild All started: Project: openSees, Configuration: Debug Win32 ------
5>Build started 17/10/2014 16:27:19.
5>_PrepareForClean:
5> Deleting file ".\..\..\obj\openSees\debug\openSees.lastbuildstate".
5>InitializeBuildStatus:
5> Touching ".\..\..\obj\openSees\debug\openSees.unsuccessfulbuild".
5>ClCompile:
5> tclAppInit.cpp
5> tclMain.cpp
5> Generating Code...
5>LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/FORCE' specification
5> Creating library .\..\..\bin\openSees.lib and object .\..\..\bin\openSees.exp
5>libm.lib(libm_error.obj) : error LNK2019: unresolved external symbol _errno referenced in function ___libm_error_support
5>libifcore.lib(for_nt_open_proc.obj) : error LNK2001: unresolved external symbol _errno
5>libifcore.lib(for_portlib.obj) : error LNK2001: unresolved external symbol _errno
5>libifcore.lib(for_init.obj) : error LNK2019: unresolved external symbol __pxcptinfoptrs referenced in function _GETEXCEPTIONPTRSQQ
5>.\..\..\bin/OpenSees.exe : fatal error LNK1120: 2 unresolved externals
5>
5>Build FAILED.
5>
5>Time Elapsed 00:00:00.99
========== Rebuild All: 4 succeeded, 1 failed, 0 skipped ==========

After that, I installed Intel Visual Fortan and related libraries but nothing changed. I tried to open the OpenSees.sln file (VC2005?) but Visual Studio 2010 showed the following error message:

C:\OpenSees\Win32\proj\openSees\OpenSees2005.vcxproj : error : Project "C:\OpenSees\Win32\proj\openSees\OpenSees2005.vcxproj" could not be found.
C:\OpenSees\Win32\proj\openSeesTk\OpenSeesTk2005.vcxproj : error : Project "C:\OpenSees\Win32\proj\openSeesTk\OpenSeesTk2005.vcxproj" could not be found.
C:\OpenSees\Win32\proj\quickMain\quickMain2005.vcxproj : error : Project "C:\OpenSees\Win32\proj\quickMain\quickMain2005.vcxproj" could not be found.

Anyone know how to fix it?
Giuseppe Abbiati
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Re: Building v.2.4.4

Post by fmk »

you don't want the OpenSeesVC6 (that is for a very sold version of visual studio < 2003).. you need to throw out the Win32 dir and start again
cxc08
Posts: 23
Joined: Fri Mar 02, 2012 5:51 pm
Location: Tokyo

Re: Building v.2.4.4

Post by cxc08 »

blaiman wrote:
> I fixed the problem. Simply just commented out the "DoddRestr"
> class calls and it builds perfectly fine now.

Hi blaiman, I has encountered exactly the same error with yours. Could you please explain how you fixed the problem in detail? Thank you very much~
blaiman
Posts: 56
Joined: Wed Jul 11, 2012 11:59 am
Location: RISA Tech, Inc.

Re: Building v.2.4.4

Post by blaiman »

It's very simple. Look under the TclModelBuilderUniaxialMaterialCommand.cpp file under the material/uniaxial folder and then comment out the following lines:
extern void *OPS_DoddRestr(void);
} else if ((strcmp(argv[1],"DoddRestr") == 0)) {

void *theMat = OPS_DoddRestr();
if (theMat != 0)
theMaterial = (UniaxialMaterial *)theMat;
else
return TCL_ERROR;

After doing that, just build the solution again and you should be successful.
Brighton Laiman
Development Engineer
RISA Technologies
Foothill Ranch, CA
cxc08
Posts: 23
Joined: Fri Mar 02, 2012 5:51 pm
Location: Tokyo

Re: Building v.2.4.4

Post by cxc08 »

blaiman wrote:
> It's very simple. Look under the TclModelBuilderUniaxialMaterialCommand.cpp
> file under the material/uniaxial folder and then comment out the following
> lines:
> extern void *OPS_DoddRestr(void);
> } else if ((strcmp(argv[1],"DoddRestr") == 0)) {
>
> void *theMat = OPS_DoddRestr();
> if (theMat != 0)
> theMaterial = (UniaxialMaterial *)theMat;
> else
> return TCL_ERROR;
>
> After doing that, just build the solution again and you should be
> successful.

Thanks a lot blaiman. I built the solution successfully after commented out those lines.

Then I tried to debug the quickmain object. But the window shut down automatically and the following messages were output:

'quickMain.exe': Loaded 'E:\OpenSees Workshop\OpenSees5764\Win32\bin\quickMain.exe', Symbols loaded.
'quickMain.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll', Cannot find or open the PDB file
'quickMain.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll', Cannot find or open the PDB file
'quickMain.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll', Cannot find or open the PDB file
'quickMain.exe': Loaded 'C:\Windows\SysWOW64\sysfer.dll', Cannot find or open the PDB file
'quickMain.exe': Loaded 'C:\ProgramData\Symantec\Symantec Endpoint Protection\12.1.2015.2015.105\Data\Definitions\BASHDefs\20141107.011\UMEngx86.dll', Cannot find or open the PDB file
'quickMain.exe': Loaded 'C:\Windows\SysWOW64\imagehlp.dll', Cannot find or open the PDB file
'quickMain.exe': Loaded 'C:\Windows\SysWOW64\msvcrt.dll', Cannot find or open the PDB file
'quickMain.exe': Loaded 'C:\Windows\SysWOW64\advapi32.dll', Cannot find or open the PDB file
'quickMain.exe': Loaded 'C:\Windows\SysWOW64\sechost.dll', Cannot find or open the PDB file
'quickMain.exe': Loaded 'C:\Windows\SysWOW64\rpcrt4.dll', Cannot find or open the PDB file
'quickMain.exe': Loaded 'C:\Windows\SysWOW64\sspicli.dll', Cannot find or open the PDB file
'quickMain.exe': Loaded 'C:\Windows\SysWOW64\cryptbase.dll', Cannot find or open the PDB file
The thread 'Win32 Thread' (0x10954) has exited with code -1 (0xffffffff).
The program '[69016] quickMain.exe: Native' has exited with code -1 (0xffffffff).

Did you have the same problem? Could you give me any solution or suggestions?
Looking forward for your reply.
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Re: Building v.2.4.4

Post by fmk »

ignore quickMain (i need to remove it) .. just try and debug OpenSees itself.
hobbylofty
Posts: 13
Joined: Tue Jul 03, 2012 8:54 am
Location: Roma Tre University

Re: Building v.2.4.4

Post by hobbylofty »

As for error:
libm.lib(libm_error.obj) : error LNK2019: unresolved external symbol _errno referenced in function ___libm_error_support

My solution is to add the file "VC2005errno.cpp" into the project failed.
The file "VC2005errno.cpp" locates in OpenSees/Win32.
Department of structures
Rome Tre University
Post Reply