Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create include directory to help include namespaced header files #7

Closed
NZSmartie opened this issue Mar 16, 2017 · 2 comments
Closed

Comments

@NZSmartie
Copy link
Contributor

Before the rebase in 0fa8289, I set my makefile to include the base folder which lobaro-coap was residing in. So my project's includes looked like:

#include "lobaro-coap/coap.h"

Namespacing the include files makes it easier when dealing multiple libraries or project file names that conflict.
In my case, esp-idf has included it's own own ported version of libcoap which I don't want to use. So #include "coap.h" could either mean libcoap's coap.h, or lobaro-coap's coap.h which my compiler isn't too happy about.

with the files now sitting under /src It would require me to create a symbolic link to fix the issue or maybe branch and rename the folder.

Instead I would like to propose that header files are moved to /include/lobaro-coap/ under the project root directory to help clean up potentially conflicting names.

@niondir
Copy link
Member

niondir commented Mar 16, 2017

What about using the library as a precompiled .a file and just reference the liblobaro_coap.h file which now contains most of the required public API?

It's possible after the api_refactoring. Anyway the only file you need now should be "liblobaro_coap.h" - we can move even more definitions there, it contains only the ones I needed yet.

@niondir
Copy link
Member

niondir commented Mar 24, 2017

As discussed in chat and my previous comment the issue is solved in a different way now. I don't think it's the end of header file refactoring yet but it's in a usable shape.

@niondir niondir closed this as completed Mar 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants