Error messages while creating ringbuffer

Staubgeborener
Posts: 20
Joined: Sat Jul 22, 2017 11:59 am

Error messages while creating ringbuffer

Postby Staubgeborener » Thu Jul 27, 2017 8:07 am

I try to create a ringbuffer with this librarys

Code: Select all

#include "freertos/FreeRTOS.h"
#include <freertos/queue.h>
#include "freertos/ringbuf.h"
but i'll get only error messages:

Code: Select all

RingbufHandle_t packetRingbuf;
packetRingbuf=xRingbufferCreate(12*1024, RINGBUF_TYPE_NOSPLIT);
$ make flash
CXX promiscuous_mode_esp32.o
D:/msys32/home//esp/esp-idf/promiscuous_mode_esp32/main/promiscuous_mode_esp32.cpp:36:1: error: 'packetRingbuf' does not name a type
packetRingbuf=xRingbufferCreate(12*1024, RINGBUF_TYPE_NOSPLIT);

Code: Select all

RingbufHandle_t packetRingbuf = xRingbufferCreate(1024, RINGBUF_TYPE_NOSPLIT);
$ make flash
CXX promiscuous_mode_esp32.o
AR libmain.a
LD promiscuous_mode_esp32.elf
D:/msys32/home//esp/esp-idf/promiscuous_mode_esp32/build/main\libmain.a(promiscuous_mode_esp32.o):(.literal._Z41__static_initialization_and_destruction_0ii+0x18): undefined reference to `xRingbufferCreate(unsigned int, ringbuf_type_t)'
D:/msys32/home//esp/esp-idf/promiscuous_mode_esp32/build/main\libmain.a(promiscuous_mode_esp32.o): In function `__static_initialization_and_destruction_0(int, int)':
d:\msys32\opt\xtensa-esp32-elf\xtensa-esp32-elf\include\c++\5.2.0\bits/shared_ptr_base.h:311: undefined reference to `xRingbufferCreate(unsigned int, ringbuf_type_t)'
collect2.exe: error: ld returned 1 exit status
make: *** [D:/msys32/home//esp/esp-idf/make/project.mk:323: /home//esp/esp-idf/promiscuous_mode_esp32/build/promiscuous_mode_esp32.elf] Fehler 1

Code: Select all

RingbufHandle_t packetRingbuf;
xRingbufferCreate(1024, RINGBUF_TYPE_NOSPLIT);
$ make flash
CXX promiscuous_mode_esp32.o
D:/msys32/home//esp/esp-idf/promiscuous_mode_esp32/main/promiscuous_mode_esp32.cpp:36:18: error: expected constructor, destructor, or type conversion before '(' token
xRingbufferCreate(1024, RINGBUF_TYPE_NOSPLIT);
^
make[1]: *** [/home//esp/esp-idf/make/component_wrapper.mk:203: promiscuous_mode_esp32.o] Fehler 1
make: *** [D:/msys32/home//esp/esp-idf/make/project.mk:386: main-build] Fehler 2
Last edited by Staubgeborener on Tue May 26, 2020 6:00 am, edited 1 time in total.

Who is online

Users browsing this forum: No registered users and 123 guests