generate报错 make_用make编译以下代码报错

代码如下:#include#include#include#include#include#include#include#include

代码如下:#include #include #include #include #include #include #include #include #include #include #include #include #include static int32_t sample_period;static time_t last_sample_time;extern kaa_error_t ext_unlimited_log_storage_create(void **log_storage_context_p, kaa_logger_t *logger);/* Retrieves current temperature. */static int32_t get_temperature_sample(void){ /* For the sake of example, random data is used */ return rand() % 10 + 25;}/* Periodically called by Kaa SDK. */static void example_callback(void *context){ time_t current_time = time(NULL); /* Respect sample period */ if (difftime(current_time, last_sample_time) >= sample_period) { int32_t temperature = get_temperature_sample(); printf("Sampled temperature: %i\n", temperature); last_sample_time = current_time; kaa_user_log_record_t *log_record = kaa_logging_data_collection_create(); log_record->temperature = temperature; kaa_logging_add_record(kaa_client_get_context(context)->log_collector, log_record, NULL); }}/* Receives new configuration data. */static kaa_error_t on_configuration_updated(void *context, const kaa_root_configuration_t *conf){ (void) context; printf("Received configuration data. New sample period: %i seconds\n", conf->sample_period); sample_period = conf->sample_period; return KAA_ERR_NONE;}int main(void){ /* Init random generator used to generate temperature */ srand(time(NULL)); /* Prepare Kaa client. */ kaa_client_t *kaa_client = NULL; kaa_error_t error = kaa_client_create(&kaa_client, NULL); if (error) {//部分省略报错命令如下:

展开

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值