WriteHtmlVariable(fd, AnyValue);? Compiler Error??
Posted: Thu Dec 10, 2009 11:15 pm
I'm just about almost there posting data from a serial port onto a webpage, but
Eclipse is reporting errors when I try to dynamically display the captured variable on the webpage!
There is no Eclipse compiler error when I run this sample code below, so far so good!
WriteHtmlVariable(fd, TimeTick/TICKS_PER_SECOND);
Embedded on WebPage <!--VARIABLE TimeTick/TICKS_PER_SECOND -->
However if I substitute this bit of simple sample code with my own variable there is a compiler error?
Eclipse doesn't really tell me, where I have gone wrong?
int AnyValue=24; ; // I’ve declared my own value of variable here
WriteHtmlVariable(fd, AnyValue);
Embedded somewhere on my WebPage <!--VARIABLE AnyValue -->
This generates the following from the compiler
In file included from htmldata.cpp:3623:
HtmlVar.h:10:23: warning: no newline at end of file
htmldata.cpp: In function 'int DoHtmlVariable(int, WORD)':
htmldata.cpp:3629: error: 'AnyValue' was not declared in this scope
Build error occurred, build is stopped
Time consumed: 4078 ms.
Grateful for any insight into this puzzle thanks -It may have something to do with mixing extern C++ functions with C generated parameters?
Paul
Eclipse is reporting errors when I try to dynamically display the captured variable on the webpage!
There is no Eclipse compiler error when I run this sample code below, so far so good!
WriteHtmlVariable(fd, TimeTick/TICKS_PER_SECOND);
Embedded on WebPage <!--VARIABLE TimeTick/TICKS_PER_SECOND -->
However if I substitute this bit of simple sample code with my own variable there is a compiler error?
Eclipse doesn't really tell me, where I have gone wrong?
int AnyValue=24; ; // I’ve declared my own value of variable here
WriteHtmlVariable(fd, AnyValue);
Embedded somewhere on my WebPage <!--VARIABLE AnyValue -->
This generates the following from the compiler
In file included from htmldata.cpp:3623:
HtmlVar.h:10:23: warning: no newline at end of file
htmldata.cpp: In function 'int DoHtmlVariable(int, WORD)':
htmldata.cpp:3629: error: 'AnyValue' was not declared in this scope
Build error occurred, build is stopped
Time consumed: 4078 ms.
Grateful for any insight into this puzzle thanks -It may have something to do with mixing extern C++ functions with C generated parameters?
Paul