LNK1104 cannot open file 'boost_regex.lib'

193 Views Asked by At

I'm currently trying to install a simulation package using Visual Studios 19. When I try to build the solution, I get the error message

Error LNK1104 cannot open file 'boost_regex.lib'

I am very new to C++ and installing programs from source codes so maybe this is a easy fix but I just simply don't see it.

I am using Boost v1.59 and I followed the installation guide here. I used the directions given by "5.1 Simplified Build From Source" from that guide.

I know I am probably not providing enough information on the problem, but I just simply don't know enough to know exactly what information to provide. Maybe one of you fine people can ask me a few questions and I'll try to provide answers to the best of my ability. Thanks for helping!

Edit, I have added "C:\Program Files\boost\boost_1_59_0\stage\lib\" to my Additional Library Directories under Linker

1

There are 1 best solutions below

0
John Maddock On

Whoever created the VS solution has set things up to expect non-mangled library names, if you build boost with

./b2 --with-regex --layout=sytem release

Then you will get binaries with the name that your project is expecting. Please note however that this is somewhat dangerous - it's very easy to end up linking incompatible binaries this way with either inscrutable linker errors, or strange runtime failures. Pay close attention to any linker warnings you may get!