-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Localize hostname symbol #1281
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
Comments
hostname is a symbol exported from one of SDK libraries. When you declare For now, you should avoid using this name. On Tue, Dec 22, 2015, 19:04 andig notifications@github.com wrote:
|
I'm not sure who uses it nor who should initialize it. |
@igrr said:
What does this mean? Did you ever get around to looking into it? |
hostname seems to be also defined in lwip2 now:
|
@igrr you know, this can be avoided with an anonymous namespace, which is recommended C++ style anyways (put user globals in an anonymous namespace in the .ino). Whatever else we do for this issue, that should be our recommendation for usage of globals anyways. |
@igrr hostname in lwip2 was not used and is not anymore present in sources. |
I looks like now we have 2 hostname symbols... |
After current lwip2 PR there will be only one. |
Ok, so we're back to the initial issue: the hostname symbol likely coming from the SDK.
What can be done? |
Ok, if the hostname symbol does not have to be shared between libmain and lwip, I'll just make it local in the object file where it is defined. |
hostname -> wifi_station_hostname default_hostname -> wifi_station_default_hostname
Resolved in 8edeac0. Localizing the symbols was not possible (they were used in two object files), so i added |
When I declare
I end up with a compiler conflict:
However, when I try to use the obviously existing internal
hostname
I receive an undefined error.Is
hostname
a forbidden symbol name?Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: