Tinywebserver compile problem

HI,
I’m trying to compile Simplewebserver example in IDE 1.0.3 from Tinywebserver library, I’m still getting error:

SimpleWebServer.ino: In function 'boolean index_handler(TinyWebServer&)':
SimpleWebServer:38: error: no match for 'operator<<' in 'web_server << (const __FlashStringHelper*)({...})'
SimpleWebServer.ino: In function 'void setup()':
SimpleWebServer:54: error: no match for 'operator<<' in 'Serial << (const __FlashStringHelper*)({...})'
SimpleWebServer:72: error: no match for 'operator<<' in 'Serial << (const __FlashStringHelper*)({...})'
SimpleWebServer:76: error: no match for 'operator<<' in 'Serial << (const __FlashStringHelper*)({...})'
SimpleWebServer:79: error: no match for 'operator<<' in 'Serial << (const __FlashStringHelper*)({...})'

What am I doing wrong? Thanks.

Apparently the construct:

 Serial << F("string constant");

is no longer supported. Try changing them to:

 Serial.print(F("string constant"));

Hallo John, I just changed it and TinyWebserver in this first line is gray:

TinyWebServer[/font]::PathHandler handlers[] = {
  {"/", TinyWebServer::GET, &index_handler },
  {NULL},
};

and there is another error:

SimpleWebServer.ino: In function 'boolean index_handler(TinyWebServer&)':
SimpleWebServer:38: error: no match for call to '(TinyWebServer) (const __FlashStringHelper*)'
SimpleWebServer.ino: In function 'void setup()':
SimpleWebServer:54: error: no match for call to '(HardwareSerial) (const __FlashStringHelper*)'
SimpleWebServer:72: error: no match for call to '(HardwareSerial) (const __FlashStringHelper*)'
SimpleWebServer:76: error: no match for call to '(HardwareSerial) (const __FlashStringHelper*)'
SimpleWebServer:79: error: no match for call to '(HardwareSerial) (const __FlashStringHelper*)'

Looks like you may have forgotten to add “.print”.

Hi !

I tried to compile the example "Blinkled" in TinyWebServer_master\examples, in Arduino 1.0.3, and after fixing the .print I got this :

C:...\arduino-1.0.3\libraries\TinyWebServer_master\TinyWebServer.cpp:43: error: expected constructor, destructor, or type conversion before '(' token

Of course this error has a lots of friends, but this is the first.

the part of "TinyWebServer.cpp" looks like this:h ( Flash_string in on line 43 )

FLASH_STRING(mime_types, "HTM*text/html|" "TXT*text/plain|" "CSS*text/css|" "XML*text/xml|" "JS*text/javascript|" "GIF*image/gif|" "JPG*image/jpeg|" "PNG*image/png|" "ICO*image/vnd.microsoft.icon|" "MP3*audio/mpeg|" );

//Magnus

Looks like the "FLASH_STRING" macro is not defined in your code. You may have to find the original definition and include it in your library.

Hello,

I have the problem today and i find an issue so …

For

Serial << F("string constant");

You need to add this librarie : Streaming | Arduiniana

For TinyWebServer.cpp:43: error: expected constructor, destructor, or type conversion before ‘(’ token
that come from :

FLASH_STRING(mime_types,
  "HTM*text/html|"
  "TXT*text/plain|"
  "CSS*text/css|"
  "XML*text/xml|"
  "JS*text/javascript|"
  "GIF*image/gif|"
  "JPG*image/jpeg|"
  "PNG*image/png|"
  "ICO*image/vnd.microsoft.icon|"
  "MP3*audio/mpeg|"
);

You need to add this librarie : Flash | Arduiniana