Closed jcowgill closed 2 years ago
OK, I see that the Template* files are special and not supposed to be included directly. I think the other 2 should still be fixed though.
Hi James,
Can you please send me the configure command you are using? I tried compiling with and without debugging information, but I got no errors, just a few warnings.
Best regards, Marcelo.
Dear Marcelo,
The issue is not linked to configure but to the "public" headers we install in /usr/include/upnp. Indeed, we should remove the install of TemplateInclude.h and TemplateSource.h, Concerning list.h, we should add an include to UpnpGlobal.h in this file so UPNP_INLINE will be declared. Finally, we should remove the ThreadPool.h inclusion in upnpdebug.h as ThreadPool.h is now private.
I will try to fix these issues.
Best Regards,
Fabrice
In fact, we can't remove Templatexxx files but perhaps we should find a way to let the user knows that these headers should not be included directly, should we move their installation in a "upnp/private" directory? In this case, I think we should also move list.h as it is only used by TemplateInclude.h.
Hi Folks,
Fabrice is right, if I recall correctly, at least TemplateInclude.h must stay. Also, he is right about list.h, even if no UPnP file includes it directly, we must observe that TemplateInclude.h is a class generator, so any class that uses a list type will automatically use list.h.
I tend to think that the "upnp/private" folder solution is totally acceptable for the next release. Leaves it pretty clear that these files are not for public inclusion.
Regards, Marcelo.
OK Marcelo, I will send a PR tomorrow so we can review the "upnp/private" folder solution
Finally, TemplateInclude can't easily be moved in upnp/private as it includes ixml.h which should remain in the main "upnp" public directory so I would suggest to keep Template files in their current location. Perhaps, we should just add a comment to those files to warn the user that they should not be included directly?
you can add some cpp magic that issues a warning or an error if the file is included directly.
I think this one can get closed. At least the first 2 files don't even exist anymore.
I don't know, maybe @jcowgill can test and answer. What I know is:
So three reasons and almost a year of no response - closing.
Some installed include files error out when included. They should be fixed, or maybe some of the headers are private?
TemplateInclude.h
TemplateSource.h
list.h
upnpdebug.h