TL/DR: Question start with steps that I've made and that I think are important to mention (let me know if it is not important and I will delete it). The question itself is in the bottom of page. I've posted 3 questions that has the same steps that I've issued before asking the question, however questions are different. Thanks
I've successfully compiled libharu library with cmake so I can use it in my own c++ project to generate PDF files. It was compiled with Visual Studio 2013 as Debug/Win32. cmake-gui was set following way:
Sources:
c:\Users\wakatana\Downloads\__c++_pdf__generation\libharu-RELEASE_2_3_0
Build:
C:\Users\wakatana\Downloads\__c++_pdf__generation\libharu-build32
My current project (created from scratch) that I'm using libharu in has following structure (again Visual Studio 2013):
./Debug
./libharu_example
./libharu_example/Debug
./libharu_example/Debug/libharu_example.tlog
./libharu_example/libharu
./libharu_example/libharu/include
./libharu_example/libharu/lib
./libharu_example/libharu/src
./libharu_example/libharu/src/CMakeFiles
libharu/include
contains files from C:\Users\wakatana\Downloads\__c++_pdf__generation\libharu-RELEASE_2_3_0\include
libharu/src
contains files from C:\Users\wakatana\Downloads\__c++_pdf__generation\libharu-RELEASE_2_3_0\src
libharu/lib
contains files from C:\Users\wakatana\Downloads\__c++_pdf__generation\libharu-build32\src\Debug
Visual studio project settings are following:
# C/C++ -> General -> Additional Include Directories:
$(ProjectDir)libharu\include
# C/C++ -> Preprocessor -> Preprocessor Definitions:
_CRT_SECURE_NO_WARNINGS
# Linker -> General -> Additional Library Directories
$(ProjectDir)libharu\lib
# Linker -> Input -> Additional Dependencies
libhpdfd.lib
Inside main file I'm including libharu this way:
#include "libharu/include/hpdf.h"
Finally to the question:
In the C:\Users\wakatana\Downloads\__c++_pdf__generation\libharu-build32\src\Debug
directory there are also those files:
libhpdfd.dll
libhpdfd.exp
libhpdfd.ilk
libhpdfd.lib
libhpdfd.pdb
libhpdfsd.lib
I've tried to set Linker -> Input -> Additional Dependencies
also to libhpdfsd.lib
and libhpdfd.dll
but the only one that worked was libhpdfd.lib
. What is purpose of other above mentioned files and how do I know which *.lib *.dll should I use? Also why I need to specify this to Visual Studio? Isn't it smart enough that it can load it automatically? It has already specified $(ProjectDir)libharu\lib
where all those libs were stored, why not just pick the best one automatically?