How to link boost library DLLs?

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

How to link boost library DLLs?

Boost - Users mailing list
Hello all,

How to properly link boost library DLLs? I have #define-d the following:

#define BOOST_ALL_DYN_LINK
#define BOOST_DYN_LINK
#define BOOST_THREAD_USE_DLL
#define BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION
#define BOOST_THREAD_VERSION 4

And I still get the following problem:

---------------------------
testprogs.exe - System Error
---------------------------
The code execution cannot proceed because boost_thread-vc142-mt-gd-x64-1_75.dll was not found. Reinstalling the program may fix this problem. 
---------------------------
OK   
---------------------------

I get the same error when I try to run the program using DLLs that I built and while running using the prebuilt binaries.

Not sure what step I'm missing. The program runs fine if I build using static libs. The problem is only with DLLs.

Any help is much appreciated.

Thanks,
Anand.


_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: How to link boost library DLLs?

Boost - Users mailing list
It looks to me like a runtime issue and not a build issue. You need to make sure you have the path to the Boost DLLs in your application's runtime PATH environment variable before it runs (or the DLLs in the same directory as your application).

Hope this helps.

Regards,
Nathan

On Sat, Feb 13, 2021 at 8:13 PM Anand Arumugam via Boost-users <[hidden email]> wrote:
Hello all,

How to properly link boost library DLLs? I have #define-d the following:

#define BOOST_ALL_DYN_LINK
#define BOOST_DYN_LINK
#define BOOST_THREAD_USE_DLL
#define BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION
#define BOOST_THREAD_VERSION 4

And I still get the following problem:

---------------------------
testprogs.exe - System Error
---------------------------
The code execution cannot proceed because boost_thread-vc142-mt-gd-x64-1_75.dll was not found. Reinstalling the program may fix this problem. 
---------------------------
OK   
---------------------------

I get the same error when I try to run the program using DLLs that I built and while running using the prebuilt binaries.

Not sure what step I'm missing. The program runs fine if I build using static libs. The problem is only with DLLs.

Any help is much appreciated.

Thanks,
Anand.

_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users

_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: How to link boost library DLLs?

Boost - Users mailing list
On 2/13/2021 7:41 PM, Nathan Ernst via Boost-users wrote:
It looks to me like a runtime issue and not a build issue. You need to make sure you have the path to the Boost DLLs in your application's runtime PATH environment variable before it runs (or the DLLs in the same directory as your application).

Hope this helps.

Regards,
Nathan

On Sat, Feb 13, 2021 at 8:13 PM Anand Arumugam via Boost-users <[hidden email]> wrote:
Hello all,

How to properly link boost library DLLs? I have #define-d the following:

#define BOOST_ALL_DYN_LINK
#define BOOST_DYN_LINK
#define BOOST_THREAD_USE_DLL
#define BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION
#define BOOST_THREAD_VERSION 4

And I still get the following problem:

---------------------------
testprogs.exe - System Error
---------------------------
The code execution cannot proceed because boost_thread-vc142-mt-gd-x64-1_75.dll was not found. Reinstalling the program may fix this problem. 
---------------------------
OK   
---------------------------

I get the same error when I try to run the program using DLLs that I built and while running using the prebuilt binaries.

Not sure what step I'm missing. The program runs fine if I build using static libs. The problem is only with DLLs.

Any help is much appreciated.

Thanks,
Anand.

_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users

_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users

Anand,

This is easy to fix on Windows. Windows first looks for dlls in the directory that the exe is launched from. Copy the boost dlls to the directory that testprogs.exe is in.

Damien

_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: How to link boost library DLLs?

Boost - Users mailing list
In reply to this post by Boost - Users mailing list
Adding the directory where the boost DLLs are to the PATH fixed it. I thought specifying the path to the lib directory where both the dlls and libs are is enough.

Thanks,
-a!&


On Sat, Feb 13, 2021 at 6:41 PM Nathan Ernst <[hidden email]> wrote:
It looks to me like a runtime issue and not a build issue. You need to make sure you have the path to the Boost DLLs in your application's runtime PATH environment variable before it runs (or the DLLs in the same directory as your application).

Hope this helps.

Regards,
Nathan

On Sat, Feb 13, 2021 at 8:13 PM Anand Arumugam via Boost-users <[hidden email]> wrote:
Hello all,

How to properly link boost library DLLs? I have #define-d the following:

#define BOOST_ALL_DYN_LINK
#define BOOST_DYN_LINK
#define BOOST_THREAD_USE_DLL
#define BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION
#define BOOST_THREAD_VERSION 4

And I still get the following problem:

---------------------------
testprogs.exe - System Error
---------------------------
The code execution cannot proceed because boost_thread-vc142-mt-gd-x64-1_75.dll was not found. Reinstalling the program may fix this problem. 
---------------------------
OK   
---------------------------

I get the same error when I try to run the program using DLLs that I built and while running using the prebuilt binaries.

Not sure what step I'm missing. The program runs fine if I build using static libs. The problem is only with DLLs.

Any help is much appreciated.

Thanks,
Anand.

_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users

_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users