Link a static library to be compiled with the main application

So I have a library I am using as a .lib and I also have the .dll version of it. Whenever I run the exe I have coded in c++ it requires the .dll of the library. Is there any way to avoid this? I remember in the past I was able to have the library be compiled inside of the exe but I cannot recall how I achieved that.

Stack Overflow Asked by helpme on February 19, 2021

1 Answers

One Answer

what build system are you using? The problem is arising as you are linking to the .dll file, not the .lib file. You will have to tell your linker which version he should use, this is an option in CMake or VS (or whatever you use). See:

Edit: Usually, you cannot use a .dll as a .lib or vice-versa. These are two very different things. You will have to find a .lib version of the library you are using, and link against that.

Answered by BarFoo on February 19, 2021

Add your own answers!

Related Questions

Seperate strings with regex and panda

1  Asked on January 11, 2021 by sara-daniel


Login into SAP using admin user fails

1  Asked on January 11, 2021 by gram77


Using LIKE with multiple columns in a table

3  Asked on January 10, 2021 by soldfor


Does the value of global variable persist in multiple API calls

2  Asked on January 10, 2021 by shubroto-shuvo


React Component not rendering to HTML

1  Asked on January 10, 2021 by red-apple


How can I count a pandas dataframe over duplications

4  Asked on January 10, 2021 by toby-chamberlain


javascript .eval() gives me undifined

2  Asked on January 10, 2021 by nourza


Loop for column names in python

3  Asked on January 10, 2021 by essegn


Return array of values from object based on array

2  Asked on January 9, 2021 by user4584963


How do I get out of ‘screen’ without typing ‘exit’?

5  Asked on January 9, 2021 by meder-omuraliev


How can I regroup ‘sublists’ in a list with Python?

2  Asked on January 9, 2021 by zhengrong


Ask a Question

Get help from others!

© 2022 All rights reserved.