0

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

Pascal
  • 13
  • 3
  • There are two O's in boost. – MSalters Jul 28 '22 at 11:02
  • So the program is not being built regularly by your CI system and you cannot extract build information from that? That seems like the root-cause-fail here. – Jesper Juhl Jul 28 '22 at 11:45
  • @JesperJuhl: All the developers have left. They're probably lucky that they still can get this far - they seem to have source code. But figuring this kind of problems really isn't for junior developers; the company probably should hire an experienced C++ consultant to sort out this mess. – MSalters Jul 28 '22 at 14:57
  • @MSalters regardless of how many people left, there should still be CI systems in place (and proper source code management), so a new guy should be able to pick up the pieces. If not, that's an epic fail in my book and good luck getting out of that one. – Jesper Juhl Jul 28 '22 at 15:02
  • Thanks for your help. Guess this is as I expected, a problem that I couldn't solve by myself. – Pascal Jul 29 '22 at 10:09
  • Hi ,glad to know your issue has been solveed! Please consider accepting it as an answer to change its status to Answered. Just a reminder :) – Yujian Yao - MSFT Aug 01 '22 at 01:55

1 Answers1

0

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

  • Boost Regex Library
  • for Visual Studio 2008 (containing VC++ 9.0)
  • MultiThreaded
  • version 1.37 (i.e. Boost version)

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.

MSalters
  • 173,980
  • 10
  • 155
  • 350
  • Thanks for your explanation. I will look further in the source code and try to use the new standardized library instead. – Pascal Jul 28 '22 at 12:46
  • I get a second error. "LNK1104 cannot open file 'mxst_vc80.lib'". This file is also placed in the "c++/extern" folder. I expect this file is also for Visual Studio 2008 and not VS2022. What is the purpose of this file? Where do I found some informations about it? – Pascal Jul 28 '22 at 13:03
  • @Pascal: No idea. Boost is widely used so that was easy to figure out. "mxst" doesn't ring a bell. But I agree, whatever it is, t's probably for an ancient Visual Studio version. – MSalters Jul 28 '22 at 14:54