Hi,
I have a very simple program:
#include <WebServer.h>
#include <spark_wiring_i2c.h>
#include <application.h>
void setup() {
}
void loop() {
}
which results in the following. Any suggestions on how to correct?
Thanks!
Processing test1.ino
Checking library WebServer...
Installing library WebServer 0.0.2 to lib/WebServer ...
Library WebServer 0.0.2 installed.
make -C ../modules/photon/user-part all
make[1]: Entering directory '/firmware/modules/photon/user-part'
make -C ../../../user
make[2]: Entering directory '/firmware/user'
Building cpp file: src/test1.cpp
Invoking: ARM GCC CPP Compiler
mkdir -p ../build/target/user/platform-6-msrc/
arm-none-eabi-gcc -DSTM32_DEVICE -DSTM32F2XX -DPLATFORM_THREADING=1 -DPLATFORM_ID=6 -DPLATFORM_NAME=photon -DUSBD_VID_SPARK=0x2B04 -DUSBD_PID_DFU=0xD006 -DUSBD_PID_CDC=0xC006 -DSPARK_PLATFORM -g3 -gdwarf-2 -Os -mcpu=cortex-m3 -mthumb -DINCLUDE_PLATFORM=1 -DPRODUCT_ID=6 -DPRODUCT_FIRMWARE_VERSION=65535 -DUSE_STDPERIPH_DRIVER -DDFU_BUILD_ENABLE -DSYSTEM_VERSION_STRING=0.6.3 -DRELEASE_BUILD -I./inc -I../wiring/inc -I../system/inc -I../services/inc -I../communication/src -I../hal/inc -I../hal/shared -I../hal/src/photon -I../hal/src/stm32f2xx -I../hal/src/stm32 -I../hal/src/photon/api -I../platform/shared/inc -I../platform/MCU/STM32F2xx/STM32_USB_Host_Driver/inc -I../platform/MCU/STM32F2xx/STM32_StdPeriph_Driver/inc -I../platform/MCU/STM32F2xx/STM32_USB_OTG_Driver/inc -I../platform/MCU/STM32F2xx/STM32_USB_Device_Driver/inc -I../platform/MCU/STM32F2xx/SPARK_Firmware_Driver/inc -I../platform/MCU/shared/STM32/inc -I../platform/MCU/STM32F2xx/CMSIS/Include -I../platform/MCU/STM32F2xx/CMSIS/Device/ST/Include -I../dynalib/inc -Isrc -I./libraries -Isrc -Isrc -Isrc -Isrc -Ilib/WebServer/src -I. -MD -MP -MF ../build/target/user/platform-6-msrc/test1.o.d -ffunction-sections -fdata-sections -Wall -Wno-switch -Wno-error=deprecated-declarations -fmessage-length=0 -fno-strict-aliasing -DSPARK=1 -DPARTICLE=1 -DSTART_DFU_FLASHER_SERIAL_SPEED=14400 -DSTART_YMODEM_FLASHER_SERIAL_SPEED=28800 -DSPARK_PLATFORM_NET=BCM9WCDUSI09 -fno-builtin-malloc -fno-builtin-free -fno-builtin-realloc -DLOG_INCLUDE_SOURCE_INFO=1 -DPARTICLE_USER_MODULE -DUSE_THREADING=0 -DUSE_SPI=SPI -DUSE_CS=A2 -DUSE_SPI=SPI -DUSE_CS=A2 -DUSE_THREADING=0 -DUSER_FIRMWARE_IMAGE_SIZE=0x20000 -DUSER_FIRMWARE_IMAGE_LOCATION=0x80A0000 -DMODULAR_FIRMWARE=1 -DMODULE_VERSION=4 -DMODULE_FUNCTION=5 -DMODULE_INDEX=1 -DMODULE_DEPENDENCY=4,2,109 -D_WINSOCK_H -D_GNU_SOURCE -DLOG_MODULE_CATEGORY="\"app\"" -fno-exceptions -fno-rtti -fcheck-new -std=gnu++11 -c -o ../build/target/user/platform-6-msrc/test1.o src/test1.cpp
In file included from src/test1.cpp:2:0:
lib/WebServer/src/WebServer.h:181:1: error: expected class-name before '{' token
{
^
lib/WebServer/src/WebServer.h:203:41: error: 'uint16_t' has not been declared
WebServer(const char *urlPrefix = "", uint16_t port = 80);
^
lib/WebServer/src/WebServer.h:330:24: error: 'uint8_t' has not been declared
virtual size_t write(uint8_t);
^
lib/WebServer/src/WebServer.h:331:30: error: 'uint8_t' does not name a type
virtual size_t write(const uint8_t *buffer, size_t size);
^
lib/WebServer/src/WebServer.h:334:3: error: 'uint8_t' does not name a type
uint8_t available();
^
lib/WebServer/src/WebServer.h:344:3: error: 'TCPServer' does not name a type
TCPServer m_server;
^
lib/WebServer/src/WebServer.h:345:3: error: 'TCPClient' does not name a type
TCPClient m_client;
^
lib/WebServer/src/WebServer.h:369:3: error: 'uint8_t' does not name a type
uint8_t m_buffer[WEBDUINO_OUTPUT_BUFFER_SIZE];
^
lib/WebServer/src/WebServer.h:370:3: error: 'uint8_t' does not name a type
uint8_t m_bufFill;
^
lib/WebServer/src/WebServer.h:395:45: error: 'uint16_t' has not been declared
WebServer::WebServer(const char *urlPrefix, uint16_t port) :
^
lib/WebServer/src/WebServer.h: In constructor 'WebServer::WebServer(const char*, int)':
lib/WebServer/src/WebServer.h:396:3: error: class 'WebServer' does not have any field named 'm_server'
m_server(port),
^
lib/WebServer/src/WebServer.h:397:3: error: class 'WebServer' does not have any field named 'm_client'
m_client(),
^
lib/WebServer/src/WebServer.h:405:3: error: class 'WebServer' does not have any field named 'm_bufFill'
m_bufFill(0)
^
lib/WebServer/src/WebServer.h: In member function 'void WebServer::begin()':
lib/WebServer/src/WebServer.h:413:3: error: 'm_server' was not declared in this scope
m_server.begin();
^
lib/WebServer/src/WebServer.h: At global scope:
lib/WebServer/src/WebServer.h:440:25: error: 'size_t WebServer::write' is not a static member of 'class WebServer'
size_t WebServer::write(uint8_t ch)
^
lib/WebServer/src/WebServer.h:440:25: error: 'uint8_t' was not declared in this scope
lib/WebServer/src/WebServer.h:441:1: error: expected ',' or ';' before '{' token
{
^
In file included from /usr/local/gcc-arm-embedded/arm-none-eabi/include/c++/4.9.3/ios:39:0,
from /usr/local/gcc-arm-embedded/arm-none-eabi/include/c++/4.9.3/ostream:38,
from ../wiring/inc/spark_wiring_string.h:234,
from ../wiring/inc/spark_wiring_stream.h:30,
from ../wiring/inc/spark_wiring_i2c.h:30,
from src/test1.cpp:4:
/usr/local/gcc-arm-embedded/arm-none-eabi/include/c++/4.9.3/exception:35:37: error: expected declaration before end of line
#pragma GCC visibility push(default)
^
../build/module.mk:267: recipe for target '../build/target/user/platform-6-msrc/test1.o' failed
make[2]: Leaving directory '/firmware/user'
make[2]: *** [../build/target/user/platform-6-msrc/test1.o] Error 1
../../../build/recurse.mk:11: recipe for target 'user' failed
make[1]: Leaving directory '/firmware/modules/photon/user-part'
make[1]: *** [user] Error 2
../build/recurse.mk:11: recipe for target 'modules/photon/user-part' failed
make: *** [modules/photon/user-part] Error 2