Move a C ++ application using Boost from Linux to Windows using Visual Studio 6

I made a small program with Boost on Linux 2 years ago. Now I want it to work on Windows. I found that there are several .a files in my libs folder. I am wondering how to make it work on Windows? Do I need to create Boost on Windows to get the library, or can I download somewhere? I am using Visual Studio 6.

+4
source share
4 answers

Yes, you will need to recompile for different platforms. By the way, I recently posted instructions on this.

I highly recommend that you do not use Visual Studio 6. It is very outdated and terribly inadequate. You can get newer versions for free, like Express. You will not miss anything.

+7
source

Many libraries with the extension are for headers only, you do not need to reference anything to use them. Libraries, such as boost::filesystem , require that you create libraries that are appropriate for your platform and reference them.

A preliminary compiler for MSVC7,8,9 can be found here (in the hope that you will follow GMan's advice and get rid of VS6 ...)

+2
source

.a files from Unix are similar to .lib files on Windows. They will not work, and there is no way to "convert" them without using the source compiler.

However, Boost runs on Windows. Just download it (or most likely the closest version you can find to the one your code used).

Older versions of Boost worked under VS6, but with a number of disabled elements (VS6 really hardly qualified as a C ++ compiler). If you can, I highly recommend that you use the newer version of Visual Studio.

0
source

You have several options. Building Boost will give you maximum flexibility when working with your application and increasing the number of libraries. However, you can download ready-made Boost libraries wrapped in a beautiful Windows installer, Boost Packages

But you need to keep in mind that depending on what you used in Boost, many of them are based on templates, so libraries are not required. If you use only some of the template parts, you do not need to worry about that. Just make sure you increase your inclusion path when creating.

As an additional note, you can get free but limited versions of the new MS compilers: http://www.microsoft.com/exPress/

0
source

Source: https://habr.com/ru/post/1301485/


All Articles