-
Notifications
You must be signed in to change notification settings - Fork 7
Linker error #4
Comments
Thanks for using the library.
But you need to do some research why header-only implementation is better. I don't like to make life easy without real benefit.
Just examples for cores as this library covers too many kind of boards/cores. You need only the currently used core. such as Good Luck, |
The "pros" such as discussed on this SO post seem like premature optimization to me. Unless you've profiled and found the need?
IMO, preventing a linker error for your users would be a real benefit. It takes time for us to find the source for the error, then your explanation, then to work around it as you've described. It complicates upgrading for us, too, since we have to modify the library each time. (Within the Arduino IDE, at least.) Having to modify the library is unconventional and unexpected, especially since it's listed in the Arduino Library Manager. What is the "real benefit" of having the header-only implementation in this instance? |
@khoih-prog how do you prevent this linker error from the header-only version when using this library in your own applications? |
You can have a look at a simple solution at multiple definition of `websockets2_generic::WebsocketsServer::~WebsocketsServer()' in websocket2_generic library #3 Other simpler ways to do are
I suggest you spend time to test all the options yourself, then find out why the h-only is better or worse, in which way. Research by Googling is good, but don't trust everything you read, especially something 10-15 years old. It's always better you verify what you read before using. I'm sorry I won't answer this topic anymore. |
Thanks for your work on this.
What is the purpose of the header only implementation of this library? Since it can produce the known linker error issue, and its contents are nearly identical to the
src_cpp
version, I think this library would be improved by having only thesrc_cpp
version.Describe the bug
Linker error
Steps to Reproduce
Build.
Expected behavior
Clean build.
Actual behavior
Linker error.
Debug and AT-command log (if applicable)
N/A.
Screenshots
N/A.
Information
I'm not sure if this applies. Where would I find it?
The text was updated successfully, but these errors were encountered: