Skip to content

Conflict aout classname "Task" with library TaskScheduler #2

@PBrunot

Description

@PBrunot

Using the following platform.io dependencies:

lib_deps = 
	https://github.com/arkhipenko/TaskScheduler.git
        alexcajas/EmbeddedMqttBroker@^1.0.1

compilation fails:

In file included from .pio/libdeps/wokwi/WrapperFreeRTOS/src/WrapperFreeRTOS.h:7,
                 from .pio/libdeps/wokwi/EmbeddedMqttBroker/src/MqttBroker/MqttBroker.h:6,
                 from .pio/libdeps/wokwi/EmbeddedMqttBroker/src/EmbeddedMqttBroker.h:4,
                 from include/MockMQTTBroker.h:4,
                 from include/globals.h:15,
                 from src/main.cpp:8:
.pio/libdeps/wokwi/WrapperFreeRTOS/src/Task.h:78:7: error: redefinition of 'class Task'
 class Task {
       ^~~~
In file included from .pio/libdeps/wokwi/TaskScheduler/src/TaskScheduler.h:237,
                 from src/main.cpp:6:
.pio/libdeps/wokwi/TaskScheduler/src/TaskSchedulerDeclarations.h:162:7: note: previous definition of 'class Task'
 class Task {
       ^~~~

I think adding namespace could be good option to avoid the name conflict.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions