c++visual-studioboostvisual-studio-2022boost-regex

LNK1104 cannot open file 'libboost_regex-vc90-mt-gd-1_37.lib'


Hi my team developed some years ago an application which consists of c# windows forms and c++. All developers gone away and nobody knows how to compile the source code. Now it is my job trying to compile it to be able to develop it further.

As I am not a real software developer (studied mechanical enginnering) and just learned C#, Javascript and Python I am facing huge problems. I am using Visual Studio 2022.

As I am trying to compile the .sln I get the error "LNK1104 cannot open file 'libbost_regex-vc90-t-gd-1_37.lib'. Yesterday I have installed the boost library 1.79 with the "libboost_regex-vc143..." files in the installation folder. Next I tried to add the folder as "Additional Include Directories" and the "boost/stage" folder as "Additional Library Directories" as some answers on Stack Overflow suggested. After that I could succesfully run boost in a little test-project.

In the Project folder of the application is a folder "c++/extern" with a folder called "boost" and I guess an old boost version with some files called "libboost-regex_vc80..". This folder is added as additional library in some projects of the application.

I'm confused why do I get the error: "LNK1104 cannot open file 'libbost_regex-vc90-t-gd-1_37.lib' Neither my installed boost version nor the boost files in the "c++/extern" folder match this version. Why is Visual Studio searching for these files? Can somebody give me a hint how to solve this problem?

(I can't share the source code)

Thanks in advance


Solution

  • The name of the Boost library reflects a number of things. Specifically, libboost_regex-vc90-mt-gd-1_37.lib is the

    You downloaded VS2022, which explains why you got vc143 (VC++ 14.3). And you downloaded Boost 1.79 instead of 1.37 that was part of your project. The old 1.37 is so old that it doesn't know about VS2022.

    At this point, you're looking at rather big version changes. But it might not even be necessary. The boost regex library was standardized as <regex>, and that is included out of the box in VS2022. You don't need an extra library anymore.