Replies: 2 comments 1 reply
-
You dont need the dll if you are using the header only version. The advantage of dll is that it reduces compile time of your code significantly since spdlog doesn't get compiled again and again when included by your code. |
Beta Was this translation helpful? Give feedback.
1 reply
-
btw one of the reasons i am asking this question because on this page:
https://github.com/gabime/spdlog/wiki/How-to-use-spdlog-in-DLLs
it says
Because spdlog is header-only, building shared libraries and using it in a
main program will not share the registry between them.
suggesting that if one uses the spdlog dll, this problem will not happen.
but if my understanding is correct, this problem will happen no matter
whether you use spdlog in header-only form or if you link against the dll.
…On Wed, Sep 11, 2024 at 12:18 PM Gabi Melman ***@***.***> wrote:
You dont need the dll if you are using the header only version. The
advantage of dll is that it reduces compile time of your code significantly
since spdlog doesn't get compiled again and again when included by your
code.
—
Reply to this email directly, view it on GitHub
<#3180 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A6NWEKZGUMAUCEDJ27ZC5KDZWCJPXAVCNFSM6AAAAABOBPU7BSVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTANRRHAZDQNI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am not very proficient with C++. From what I understand header-only means all the source code of the library is in header files. There are no cpp files. If we use any DLL in C++, we need to import the headers that tell the compiler what functions are exported by the DLL. But in this case if we import the headers we will get the source code as well. So is there any need to use the DLL at all? What difference does it make if any?
In fact, shouldn't linking against a DLL create a problem since you now have two "versions" - one version as a result of compiling the header files and another version in the DLL?
Beta Was this translation helpful? Give feedback.
All reactions