Error LNK1104 - cannot open file 'QuantLib-vc140-mt-s.lib'

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Error LNK1104 - cannot open file 'QuantLib-vc140-mt-s.lib'

ponram
Hi

I get the below error when i tried to build QuantLibXL_basic_vc12.sln using VisualStudio2017 on a Windows10 machine.

Error LNK1104 cannot open file 'QuantLib-vc140-mt-s.lib' QuantLibXLStatic C:\local\QuantLib\QuantLibXL\qlxl\LINK 1

Below is the information from the last build state. I got a pop-up to do an auto upgrade to v141 toolset when i first loaded the solution. I see a lib file 'QuantLib--mt-s.lib' generated but it is missing the 'vc140' string which the linker is looking for.  Can someone please help resolve this error?

#TargetFrameworkVersion=v4.0:PlatformToolSet=v141:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=8.1
Release (static runtime)|Win32|C:\local\QuantLib\QuantLibXL\|

Thanks,
Reply | Threaded
Open this post in threaded view
|

Re: Error LNK1104 - cannot open file 'QuantLib-vc140-mt-s.lib'

Mario Marra
It might not be an optimal solution but have you tried to rename the library to 'QuantLib-vc140-mt-s.lib'?

Mario
Reply | Threaded
Open this post in threaded view
|

Re: Error LNK1104 - cannot open file 'QuantLib-vc140-mt-s.lib'

Luigi Ballabio

Yes, that would work. The library was named incorrectly because your QuantLib version doesn't support VS2017 yet, but you can rename it manually.

Luigi


On Fri, Apr 28, 2017, 09:08 Mario Marra <[hidden email]> wrote:
It might not be an optimal solution but have you tried to rename the library
to 'QuantLib-vc140-mt-s.lib'?

Mario



--
View this message in context: http://quantlib.10058.n7.nabble.com/Error-LNK1104-cannot-open-file-QuantLib-vc140-mt-s-lib-tp18229p18230.html
Sent from the quantlib-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Error LNK1104 - cannot open file 'QuantLib-vc140-mt-s.lib'

ponram
Thanks Mario & Luigi

I tried after renaming the file to QuantLib-vc140-mt-s.lib and this time the linker gave the same error looking for QuantLib--mt-s.lib. So i made a copy of it to the original QuantLib--mt-s.lib and tried to build with both the lib files. This time I didn't get that error.

However, i got a whole bunch of linking errors related to Boost library such as below. All of my boost library files have *-vc141-mt-gd-1_64.lib such as boost_coroutine-vc141-mt-gd-1_64.lib.

Error LNK2001 unresolved external symbol "public: static void __cdecl boost::archive::detail::archive_serializer_map<class boost::archive::xml_iarchive>::erase(class boost::archive::detail::basic_serializer const *)" (?erase@?$archive_serializer_map@Vxml_iarchive@archive@boost@@@detail@archive@boost@@SAXPBVbasic_serializer@234@@Z) QuantLibXLStatic C:\local\QuantLib\QuantLibXL\qlxl\QuantLibObjects-vc120-mt-s-1_8_0.lib(serialization_oh.obj) 1

I am going to try using an older version of boost libraries and see if it works. Hope i am on the right track.

Thanks in advance for your help.
Reply | Threaded
Open this post in threaded view
|

Re: Error LNK1104 - cannot open file 'QuantLib-vc140-mt-s.lib'

William Capra
Hi all,

I guess I had the same problem, therefore I use this loop. Sorry in advance if I'm wrong.
While opening QuantLib_vc14.sln the first time, VS suggested to upgrade sdk from 8.1 to 10.x and platform to v141. I agreed.
I built QuantLib 1.9.2 in Visual Studio 2017. Boost 1.63.
Library built correctly but test cases failed due to the link error in the subject of this thread.
I modified QuantLib files accordingly to commit: https://github.com/lballabio/QuantLib/commit/5c5eaba5359bc0d946ee3e8f05a9f1e401211176 (except for gitignore).

QuantLib 1.9.2 built successfully in VS 2017 and all test cases passed.
Hope this could help.

Best,

William



On Fri, Apr 28, 2017 at 11:52 PM ponram <[hidden email]> wrote:
Thanks Mario & Luigi

I tried after renaming the file to QuantLib-vc140-mt-s.lib and this time the
linker gave the same error looking for QuantLib--mt-s.lib. So i made a copy
of it to the original QuantLib--mt-s.lib and tried to build with both the
lib files. This time I didn't get that error.

However, i got a whole bunch of linking errors related to Boost library such
as below. All of my boost library files have *-vc141-mt-gd-1_64.lib such as
boost_coroutine-vc141-mt-gd-1_64.lib.

Error   LNK2001 unresolved external symbol "public: static void __cdecl
boost::archive::detail::archive_serializer_map<class
boost::archive::xml_iarchive>::erase(class
boost::archive::detail::basic_serializer const *)"
(?erase@?$archive_serializer_map@Vxml_iarchive@archive@boost@@@detail@archive@boost@@SAXPBVbasic_serializer@234@@Z)
QuantLibXLStatic
C:\local\QuantLib\QuantLibXL\qlxl\QuantLibObjects-vc120-mt-s-1_8_0.lib(serialization_oh.obj)
1

I am going to try using an older version of boost libraries and see if it
works. Hope i am on the right track.

Thanks in advance for your help.



--
View this message in context: http://quantlib.10058.n7.nabble.com/Error-LNK1104-cannot-open-file-QuantLib-vc140-mt-s-lib-tp18229p18234.html
Sent from the quantlib-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Error LNK1104 - cannot open file 'QuantLib-vc140-mt-s.lib'

ponram
Hi William,

I incorporated your changes and it produced QuantLib-vc141-mt-gd.lib file. However, the linker gave me the following error:

2>libboost_unit_test_framework-vc141-mt-gd-1_64.lib(test_tree.obj) : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'
2>Done building project "testsuite.vcxproj" -- FAILED.

Do i need to do any separate build for boost binaries? I used the installer for boost_1_64_0.

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Error LNK1104 - cannot open file 'QuantLib-vc140-mt-s.lib'

Luigi Ballabio
Visual Studio 2017 will be supported in QuantLib 1.10, out shortly.  If you want to try it before release, you can check it out from the v1.10.x branch on GitHub.

Luigi


On Fri, May 5, 2017 at 3:59 AM ponram <[hidden email]> wrote:
Hi William,

I incorporated your changes and it produced QuantLib-vc141-mt-gd.lib file.
However, the linker gave me the following error:

2>libboost_unit_test_framework-vc141-mt-gd-1_64.lib(test_tree.obj) : fatal
error LNK1112: module machine type 'x64' conflicts with target machine type
'X86'
2>Done building project "testsuite.vcxproj" -- FAILED.

Do i need to do any separate build for boost binaries? I used the installer
for boost_1_64_0.

Thanks



--
View this message in context: http://quantlib.10058.n7.nabble.com/Error-LNK1104-cannot-open-file-QuantLib-vc140-mt-s-lib-tp18229p18250.html
Sent from the quantlib-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users