-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Closed
Labels
Component: CompilationRelated to compilation of Arduino sketchesRelated to compilation of Arduino sketchesType: BugType: WontfixArduino has decided that it will not resolve the reported issue or implement the requested featureArduino has decided that it will not resolve the reported issue or implement the requested feature
Description
In the example code below I am placing some functions into a namespace to avoid clashes. (This is in answer to a question about combining two sketches). However the automated function-prototype generation seems to be suppressed inside a namespace.
namespace foo
{
// void bar ();
void fubar ()
{
bar ();
} // end of fubar
void bar ()
{
} // end of bar
} // end of namespace foo
void setup()
{
foo::fubar ();
} // end of setup
void loop()
{
} // end of loop
If you uncomment the manual function prototype near the top the code compiles OK. As written however I get the error:
/home/nick/Pictures/Blink tutorial/Example/Example.ino: In function 'void foo::fubar()':
Example:7: error: 'bar' was not declared in this scope
bar ();
^
exit status 1
'bar' was not declared in this scope
This is with IDE 1.8.1.
Metadata
Metadata
Assignees
Labels
Component: CompilationRelated to compilation of Arduino sketchesRelated to compilation of Arduino sketchesType: BugType: WontfixArduino has decided that it will not resolve the reported issue or implement the requested featureArduino has decided that it will not resolve the reported issue or implement the requested feature