Error LNK1181 while building OpenSees by Visual Studio2017
Moderators: silvia, selimgunay, Moderators
Error LNK1181 while building OpenSees by Visual Studio2017
Dear All
I am getting the following error when I try to build the solution (OpenSees.sln for Win32) of the source code.
I obtained the source code from Github at 2018/11/16.
OpenSees release_2.5.0
tcl/tk x64 8.5.18
Error: LNK1181 cannot open input file 'ifconsol.lib'
----------------------------------------------------------------------------------------------------
>------ Build started: Project: OpenSees, Configuration: Debug x64 ------
>tclAppInit.cpp
>tclMain.cpp
>VC2005errno.cpp
>Generating Code...
>LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/FORCE' specification
>LINK : fatal error LNK1181: cannot open input file 'ifconsol.lib'
>Done building project "OpenSees.vcxproj" -- FAILED.
-----------------------------------------------------------------------------------------------------
My OS is windows 7 (64bit), so I tried to compile using OpenSees.sln for Win64.
The same error occurred.
Can anyone help me out to identify what goes wrong and fix it?
I am getting the following error when I try to build the solution (OpenSees.sln for Win32) of the source code.
I obtained the source code from Github at 2018/11/16.
OpenSees release_2.5.0
tcl/tk x64 8.5.18
Error: LNK1181 cannot open input file 'ifconsol.lib'
----------------------------------------------------------------------------------------------------
>------ Build started: Project: OpenSees, Configuration: Debug x64 ------
>tclAppInit.cpp
>tclMain.cpp
>VC2005errno.cpp
>Generating Code...
>LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/FORCE' specification
>LINK : fatal error LNK1181: cannot open input file 'ifconsol.lib'
>Done building project "OpenSees.vcxproj" -- FAILED.
-----------------------------------------------------------------------------------------------------
My OS is windows 7 (64bit), so I tried to compile using OpenSees.sln for Win64.
The same error occurred.
Can anyone help me out to identify what goes wrong and fix it?
Re: Error LNK2001 while building OpenSees by Visual Studio20
LiuYanyan wrote:
> Dear All
> I am getting the following error when I try to build the solution (OpenSees.sln for
> Win32) of the source code.
> I obtained the source code from Github at 2018/11/16.
> OpenSees release_2.5.0
> tcl/tk x64 8.5.18
>
> Error: LNK1181 cannot open input file 'ifconsol.lib'
>
> ----------------------------------------------------------------------------------------------------
> >------ Build started: Project: OpenSees, Configuration: Debug x64 ------
> >tclAppInit.cpp
> >tclMain.cpp
> >VC2005errno.cpp
> >Generating Code...
> >LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/FORCE' specification
> >LINK : fatal error LNK1181: cannot open input file 'ifconsol.lib'
> >Done building project "OpenSees.vcxproj" -- FAILED.
> -----------------------------------------------------------------------------------------------------
>
> My OS is windows 7 (64bit), so I tried to compile using OpenSees.sln for Win64.
> The same error occurred.
>
> Can anyone help me out to identify what goes wrong and fix it?
I dropped 'ifconsol.lib' and 'ifcoremt.lib' into Win32/lib and fixed this problem but more errors came out.
They are LNK 2001 and LNK 2019.
I past part of the description here.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
domain.lib(TclSeriesCommand.obj) : error LNK2001: unresolved external symbol __imp__Tcl_SplitList
domain.lib(TclSeriesIntegratorCommand.obj) : error LNK2001: unresolved external symbol __imp__Tcl_SplitList
element.lib(TclForceBeamColumnCommand.obj) : error LNK2001: unresolved external symbol __imp__Tcl_SplitList
element.lib(TclForceBeamColumnCommand.obj) : error LNK2019: unresolved external symbol __imp__Tcl_Merge referenced in function "int __cdecl TclModelBuilder_addForceBeamColumn(void *,struct Tcl_Interp *,int,char const * *,class Domain *,class TclModelBuilder *)" (?TclModelBuilder_addForceBeamColumn@@YAHPAXPAUTcl_Interp@@HPAPBDPAVDomain@@PAVTclModelBuilder@@@Z)
25>element.lib(TclForceBeamColumnCommand.obj) : error LNK2019: unresolved external symbol "public: __thiscall DispBeamColumnNL2d::DispBeamColumnNL2d(int,int,int,int,class SectionForceDeformation * *,class BeamIntegration &,class CrdTransf &,double)" (??0DispBeamColumnNL2d@@QAE@HHHHPAPAVSectionForceDeformation@@AAVBeamIntegration@@AAVCrdTransf@@N@Z) referenced in function "int __cdecl TclModelBuilder_addForceBeamColumn(void *,struct Tcl_Interp *,int,char const * *,class Domain *,class TclModelBuilder *)" (?TclModelBuilder_addForceBeamColumn@@YAHPAXPAUTcl_Interp@@HPAPBDPAVDomain@@PAVTclModelBuilder@@@Z)
optimization.lib(TclOptimizationBuilder.obj) : error LNK2019: unresolved external symbol __imp__Tcl_GetVar2 referenced in function "int __cdecl TclOptimizationModelBuilder_addDesignVariable(void *,struct Tcl_Interp *,int,char * *)" (?TclOptimizationModelBuilder_addDesignVariable@@YAHPAXPAUTcl_Interp@@HPAPAD@Z)
optimization.lib(DesignVariable.obj) : error LNK2001: unresolved external symbol __imp__Tcl_GetVar2
optimization.lib(ConstraintFunction.obj) : error LNK2001: unresolved external symbol __imp__Tcl_GetVar2
optimization.lib(ObjectiveFunction.obj) : error LNK2001: unresolved external symbol __imp__Tcl_GetVar2
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Does anyone have an idea to fix that?
> Dear All
> I am getting the following error when I try to build the solution (OpenSees.sln for
> Win32) of the source code.
> I obtained the source code from Github at 2018/11/16.
> OpenSees release_2.5.0
> tcl/tk x64 8.5.18
>
> Error: LNK1181 cannot open input file 'ifconsol.lib'
>
> ----------------------------------------------------------------------------------------------------
> >------ Build started: Project: OpenSees, Configuration: Debug x64 ------
> >tclAppInit.cpp
> >tclMain.cpp
> >VC2005errno.cpp
> >Generating Code...
> >LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/FORCE' specification
> >LINK : fatal error LNK1181: cannot open input file 'ifconsol.lib'
> >Done building project "OpenSees.vcxproj" -- FAILED.
> -----------------------------------------------------------------------------------------------------
>
> My OS is windows 7 (64bit), so I tried to compile using OpenSees.sln for Win64.
> The same error occurred.
>
> Can anyone help me out to identify what goes wrong and fix it?
I dropped 'ifconsol.lib' and 'ifcoremt.lib' into Win32/lib and fixed this problem but more errors came out.
They are LNK 2001 and LNK 2019.
I past part of the description here.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
domain.lib(TclSeriesCommand.obj) : error LNK2001: unresolved external symbol __imp__Tcl_SplitList
domain.lib(TclSeriesIntegratorCommand.obj) : error LNK2001: unresolved external symbol __imp__Tcl_SplitList
element.lib(TclForceBeamColumnCommand.obj) : error LNK2001: unresolved external symbol __imp__Tcl_SplitList
element.lib(TclForceBeamColumnCommand.obj) : error LNK2019: unresolved external symbol __imp__Tcl_Merge referenced in function "int __cdecl TclModelBuilder_addForceBeamColumn(void *,struct Tcl_Interp *,int,char const * *,class Domain *,class TclModelBuilder *)" (?TclModelBuilder_addForceBeamColumn@@YAHPAXPAUTcl_Interp@@HPAPBDPAVDomain@@PAVTclModelBuilder@@@Z)
25>element.lib(TclForceBeamColumnCommand.obj) : error LNK2019: unresolved external symbol "public: __thiscall DispBeamColumnNL2d::DispBeamColumnNL2d(int,int,int,int,class SectionForceDeformation * *,class BeamIntegration &,class CrdTransf &,double)" (??0DispBeamColumnNL2d@@QAE@HHHHPAPAVSectionForceDeformation@@AAVBeamIntegration@@AAVCrdTransf@@N@Z) referenced in function "int __cdecl TclModelBuilder_addForceBeamColumn(void *,struct Tcl_Interp *,int,char const * *,class Domain *,class TclModelBuilder *)" (?TclModelBuilder_addForceBeamColumn@@YAHPAXPAUTcl_Interp@@HPAPBDPAVDomain@@PAVTclModelBuilder@@@Z)
optimization.lib(TclOptimizationBuilder.obj) : error LNK2019: unresolved external symbol __imp__Tcl_GetVar2 referenced in function "int __cdecl TclOptimizationModelBuilder_addDesignVariable(void *,struct Tcl_Interp *,int,char * *)" (?TclOptimizationModelBuilder_addDesignVariable@@YAHPAXPAUTcl_Interp@@HPAPAD@Z)
optimization.lib(DesignVariable.obj) : error LNK2001: unresolved external symbol __imp__Tcl_GetVar2
optimization.lib(ConstraintFunction.obj) : error LNK2001: unresolved external symbol __imp__Tcl_GetVar2
optimization.lib(ObjectiveFunction.obj) : error LNK2001: unresolved external symbol __imp__Tcl_GetVar2
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Does anyone have an idea to fix that?
-
- Posts: 1
- Joined: Thu Nov 22, 2018 4:59 am
- Contact:
Re: Error LNK1181 while building OpenSees by Visual Studio20
hi LiuYanyan, thanks for sharing.....
Re: Error LNK1181 while building OpenSees by Visual Studio20
Finally, I succeed.
Now I summarize my solution.
About error LNK 2001:
I try to compile the OS2.5.0 (Win32) on VS2017 32bit.
So I uninstalled Tcl and reinstalled it into Program Files (x86).
About error LNK 2019:
The following four files are missing. Add these files to the appropriate project and build solution.
DispBeamColumnNL2d.h DispBeamColumnNL2d.cpp
Beam3dPartialUniformLoad.h Beam3dPartialUniformLoad.cpp
Wish my experience is helpful.
Now I summarize my solution.
About error LNK 2001:
I try to compile the OS2.5.0 (Win32) on VS2017 32bit.
So I uninstalled Tcl and reinstalled it into Program Files (x86).
About error LNK 2019:
The following four files are missing. Add these files to the appropriate project and build solution.
DispBeamColumnNL2d.h DispBeamColumnNL2d.cpp
Beam3dPartialUniformLoad.h Beam3dPartialUniformLoad.cpp
Wish my experience is helpful.
Re: Error LNK1181 while building OpenSees by Visual Studio20
Hi Yanyan,
Where did you find 'ifconsol.lib' and 'ifcoremt.lib'?
So far I have the same issue as you had before.
Thanks,
Yiming
Where did you find 'ifconsol.lib' and 'ifcoremt.lib'?
So far I have the same issue as you had before.
Thanks,
Yiming
Re: Error LNK1181 while building OpenSees by Visual Studio20
yimingjia wrote:
> Hi Yanyan,
>
> Where did you find 'ifconsol.lib' and 'ifcoremt.lib'?
> So far I have the same issue as you had before.
>
> Thanks,
> Yiming
Hi Yiming
'ifconsol.lib' and 'ifcoremt.lib' are Fortran Library files.
Because I have installed Inter Visual Fortran before, Fortran Library already exists on my computer.
Firstly, I recommend you search these files on your computer.
If there are no such files on your computer, you can consider installing or I can send you these files.
> Hi Yanyan,
>
> Where did you find 'ifconsol.lib' and 'ifcoremt.lib'?
> So far I have the same issue as you had before.
>
> Thanks,
> Yiming
Hi Yiming
'ifconsol.lib' and 'ifcoremt.lib' are Fortran Library files.
Because I have installed Inter Visual Fortran before, Fortran Library already exists on my computer.
Firstly, I recommend you search these files on your computer.
If there are no such files on your computer, you can consider installing or I can send you these files.
Re: Error LNK1181 while building OpenSees by Visual Studio20
Hello Yanyan
I also encountered the error ''fatal error LNK1181: cannot open input file 'ifconsol.lib'''. My configuration is Windows 10 (64bit), VS2017 Community (64bit). Could you share which version of Inter Visual Fortran should I install?
Many thanks!
I also encountered the error ''fatal error LNK1181: cannot open input file 'ifconsol.lib'''. My configuration is Windows 10 (64bit), VS2017 Community (64bit). Could you share which version of Inter Visual Fortran should I install?
Many thanks!
Re: Error LNK1181 while building OpenSees by Visual Studio20
JackWang wrote:
> Hello Yanyan
> I also encountered the error ''fatal error LNK1181: cannot open input file
> 'ifconsol.lib'''. My configuration is Windows 10 (64bit), VS2017 Community
> (64bit). Could you share which version of Inter Visual Fortran should I
> install?
> Many thanks!
Hello JackWang
I installed Intel® Parallel Studio XE Cluster Edition.
There are other options.
As long as you choose the right application(64bit), it will work fine.
> Hello Yanyan
> I also encountered the error ''fatal error LNK1181: cannot open input file
> 'ifconsol.lib'''. My configuration is Windows 10 (64bit), VS2017 Community
> (64bit). Could you share which version of Inter Visual Fortran should I
> install?
> Many thanks!
Hello JackWang
I installed Intel® Parallel Studio XE Cluster Edition.
There are other options.
As long as you choose the right application(64bit), it will work fine.
Re: Error LNK1181 while building OpenSees by Visual Studio20
Hi Yanyan,
Thanks for your kind instruction. I have fixed up the error ''fatal error LNK1181: cannot open input file 'ifconsol.lib'' by installing Intel Parallel Studio XE 2018 (update 3). Could you share which version of Visual Studio you are using to build OpenSees2.5.0(64bit) source code?
Now, I am using the Visual Studio 2017 Community (64bit). There is a prompt when I open the OpenSees.sln at the first time. The prompt is "The following projects use an earlier version of the Visual C++ platform toolset. You can upgrade your projects to target the latest Microsoft toolset. You can also select the target Windows SDK version from those installed on your machine." Then, the following errors come up when building the source code:
16>MaterialResponse.cpp
12>Done building project "material.vcxproj" -- FAILED.
---------------------------------------------------------------------------------------------------------------
25>LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/FORCE' specification
25>LINK : fatal error LNK1181: cannot open input file 'DoddRestrepo.lib'
25>Done building project "OpenSees.vcxproj" -- FAILED.
---------------------------------------------------------------------------------------------------------------
26>d:\windows kits\10\include\10.0.17763.0\um\winnt.h(20580): error C2059: syntax error: 'constant'
26>d:\windows kits\10\include\10.0.17763.0\um\winnt.h(20580): error C2238: unexpected token(s) preceding ';'
26>d:\windows kits\10\include\10.0.17763.0\um\processthreadsapi.h(1032): error C2059: syntax error: 'constant'
26>d:\windows kits\10\include\10.0.17763.0\um\processthreadsapi.h(1032): error C2238: unexpected token(s) preceding ';'
26>d:\windows kits\10\include\10.0.17763.0\um\processthreadsapi.h(1151): error C2059: syntax error: 'constant'
26>d:\windows kits\10\include\10.0.17763.0\um\processthreadsapi.h(1151): error C2238: unexpected token(s) preceding ';'
26>d:\osmaterialdev\opensees250\src\tcl\winmain.cpp(286): warning C4996: 'vsprintf': This function or variable may be unsafe. Consider using vsprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
26>d:\windows kits\10\include\10.0.17763.0\ucrt\stdio.h(1469): note: see declaration of 'vsprintf'
26>Generating Code...
26>Done building project "OpenSeesTk.vcxproj" -- FAILED.
========== Build: 23 succeeded, 3 failed, 0 up-to-date, 0 skipped ==========
Whether these errors are related to the version of Visual Studio? Should I use the Visual Studio 2010, which the OpenSees 2.5.0 source code used?
Many thanks!
Thanks for your kind instruction. I have fixed up the error ''fatal error LNK1181: cannot open input file 'ifconsol.lib'' by installing Intel Parallel Studio XE 2018 (update 3). Could you share which version of Visual Studio you are using to build OpenSees2.5.0(64bit) source code?
Now, I am using the Visual Studio 2017 Community (64bit). There is a prompt when I open the OpenSees.sln at the first time. The prompt is "The following projects use an earlier version of the Visual C++ platform toolset. You can upgrade your projects to target the latest Microsoft toolset. You can also select the target Windows SDK version from those installed on your machine." Then, the following errors come up when building the source code:
16>MaterialResponse.cpp
12>Done building project "material.vcxproj" -- FAILED.
---------------------------------------------------------------------------------------------------------------
25>LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/FORCE' specification
25>LINK : fatal error LNK1181: cannot open input file 'DoddRestrepo.lib'
25>Done building project "OpenSees.vcxproj" -- FAILED.
---------------------------------------------------------------------------------------------------------------
26>d:\windows kits\10\include\10.0.17763.0\um\winnt.h(20580): error C2059: syntax error: 'constant'
26>d:\windows kits\10\include\10.0.17763.0\um\winnt.h(20580): error C2238: unexpected token(s) preceding ';'
26>d:\windows kits\10\include\10.0.17763.0\um\processthreadsapi.h(1032): error C2059: syntax error: 'constant'
26>d:\windows kits\10\include\10.0.17763.0\um\processthreadsapi.h(1032): error C2238: unexpected token(s) preceding ';'
26>d:\windows kits\10\include\10.0.17763.0\um\processthreadsapi.h(1151): error C2059: syntax error: 'constant'
26>d:\windows kits\10\include\10.0.17763.0\um\processthreadsapi.h(1151): error C2238: unexpected token(s) preceding ';'
26>d:\osmaterialdev\opensees250\src\tcl\winmain.cpp(286): warning C4996: 'vsprintf': This function or variable may be unsafe. Consider using vsprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
26>d:\windows kits\10\include\10.0.17763.0\ucrt\stdio.h(1469): note: see declaration of 'vsprintf'
26>Generating Code...
26>Done building project "OpenSeesTk.vcxproj" -- FAILED.
========== Build: 23 succeeded, 3 failed, 0 up-to-date, 0 skipped ==========
Whether these errors are related to the version of Visual Studio? Should I use the Visual Studio 2010, which the OpenSees 2.5.0 source code used?
Many thanks!
Re: Error LNK1181 while building OpenSees by Visual Studio20
I had the same errors for release 2.5:
- copied DoddRestrepo.lib (and fedeas.lib) from the current release ( https://github.com/OpenSees/OpenSees/tr ... ib/release) into Win64/release/lib.
- the 'winnt.h' errors are fixed by adding #include <windows.h> on top of tkMain.cpp and winMain.cpp
- copied DoddRestrepo.lib (and fedeas.lib) from the current release ( https://github.com/OpenSees/OpenSees/tr ... ib/release) into Win64/release/lib.
- the 'winnt.h' errors are fixed by adding #include <windows.h> on top of tkMain.cpp and winMain.cpp
Re: Error LNK1181 while building OpenSees by Visual Studio20
Hello JackWang
I use visual studio 2017 and I haven't encountered these problems you mentioned above.
Maybe you can try the following method.
mneuner wrote:
> I had the same errors for release 2.5:
>
> - copied DoddRestrepo.lib (and fedeas.lib) from the current release (
> https://github.com/OpenSees/OpenSees/tr ... ib/release) into
> Win64/release/lib.
> - the 'winnt.h' errors are fixed by adding #include <windows.h> on top of
> tkMain.cpp and winMain.cpp
I use visual studio 2017 and I haven't encountered these problems you mentioned above.
Maybe you can try the following method.
mneuner wrote:
> I had the same errors for release 2.5:
>
> - copied DoddRestrepo.lib (and fedeas.lib) from the current release (
> https://github.com/OpenSees/OpenSees/tr ... ib/release) into
> Win64/release/lib.
> - the 'winnt.h' errors are fixed by adding #include <windows.h> on top of
> tkMain.cpp and winMain.cpp
Re: Error LNK1181 while building OpenSees by Visual Studio20
LiuYanyan wrote:
> yimingjia wrote:
> > Hi Yanyan,
> >
> > Where did you find 'ifconsol.lib' and 'ifcoremt.lib'?
> > So far I have the same issue as you had before.
> >
> > Thanks,
> > Yiming
>
> Hi Yiming
> 'ifconsol.lib' and 'ifcoremt.lib' are Fortran Library files.
> Because I have installed Inter Visual Fortran before, Fortran Library already exists
> on my computer.
> Firstly, I recommend you search these files on your computer.
> If there are no such files on your computer, you can consider installing or I can
> send you these files.
Hi Yanyan,
Thanks. I fixed this issue by installing Intel Parallel studio 2017.
Before, I installed Intel Parallel studio 2019, which has an integration issue for Intel Parallel studio 2019 with Visual Studio 2017.
Thanks,
Yiming
> yimingjia wrote:
> > Hi Yanyan,
> >
> > Where did you find 'ifconsol.lib' and 'ifcoremt.lib'?
> > So far I have the same issue as you had before.
> >
> > Thanks,
> > Yiming
>
> Hi Yiming
> 'ifconsol.lib' and 'ifcoremt.lib' are Fortran Library files.
> Because I have installed Inter Visual Fortran before, Fortran Library already exists
> on my computer.
> Firstly, I recommend you search these files on your computer.
> If there are no such files on your computer, you can consider installing or I can
> send you these files.
Hi Yanyan,
Thanks. I fixed this issue by installing Intel Parallel studio 2017.
Before, I installed Intel Parallel studio 2019, which has an integration issue for Intel Parallel studio 2019 with Visual Studio 2017.
Thanks,
Yiming
Re: Error LNK1181 while building OpenSees by Visual Studio20
LiuYanyan wrote:
> Hello JackWang
> I use visual studio 2017 and I haven't encountered these problems you mentioned
> above.
> Maybe you can try the following method.
>
>
> mneuner wrote:
> > I had the same errors for release 2.5:
> >
> > - copied DoddRestrepo.lib (and fedeas.lib) from the current release (
> > https://github.com/OpenSees/OpenSees/tr ... ib/release) into
> > Win64/release/lib.
> > - the 'winnt.h' errors are fixed by adding #include <windows.h> on top
> of
> > tkMain.cpp and winMain.cpp
Hi,mneuner and Yanyan, thanks to both of you!I will have a try.
> Hello JackWang
> I use visual studio 2017 and I haven't encountered these problems you mentioned
> above.
> Maybe you can try the following method.
>
>
> mneuner wrote:
> > I had the same errors for release 2.5:
> >
> > - copied DoddRestrepo.lib (and fedeas.lib) from the current release (
> > https://github.com/OpenSees/OpenSees/tr ... ib/release) into
> > Win64/release/lib.
> > - the 'winnt.h' errors are fixed by adding #include <windows.h> on top
> of
> > tkMain.cpp and winMain.cpp
Hi,mneuner and Yanyan, thanks to both of you!I will have a try.