Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Import C++ library that hasn't .dll or .lib files inside

So I have two examples of these libraries for printing nice tables. First and second.

I’ve watched MANY videos on "How to install/include/import a library into your C++ project" and each one talks about changing Visual Studio solution properties like C/C++ -> General -> Additional Include Directories, Linker -> General -> Additional Library Directories and finally Linker -> Input -> Additional Dependencies, which should contain paths to .h/.hpp or .dll/.lib files respectively.

So as we can see we don’t have any of these files in the two libraries above.
Hence the question. How do I work with such libraries in my cpp project? I just need direct instructions or something because I don’t think I’ll ever understand otherwise. I am trying to install some c++ library for the first time.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Addition: I don’t want to use any package managers.

>Solution :

libfort has a README.md that describes how to integrate it with your project (a step that does not actually require prior compilation, as it is not a "lib" but merely some additional source files to be added to your project directly).

bprinter requires prior compilation / installation, and comes with a CMakeLists.txt configuration to do this. You’ll need CMake to do it, but it makes things really simple for you. Check its documentation.


*.dll and *.lib are binary files compiled from the source you check out from a source repository. They are not supposed to be provided from a GitHub repo. Prior to using a compiled library in the way you described (by making the necessary adjustments in your project’s VS configuration), you need to compile and install the library according to that project’s documentation (as with bprinter).

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading