undefined reference
Posted: Mon Mar 30, 2020 8:24 pm
Hei Guys,
I'm a beginner in cmake as I'm working with Visual Studio normally.
I'm trying to set up a project with two components, one inherits from the other.
The Structure of the Tree is attached.
The issue is that I get an error "undefined reference" for the Component I want to inherit from.
CMakeLists.txt are:
I2CKeypad:
idf_component_register(SRCS "I2CKeypad.cpp" INCLUDE_DIRS "." "../I2CPeripheral")
I2CPeripheral:
idf_component_register(SRCS "I2CPeripheral.cpp" INCLUDE_DIRS ".")
main:
idf_component_register(SRCS "main.cpp" INCLUDE_DIRS ".")
project:
cmake_minimum_required(VERSION 3.5)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(i2cKeypad)
I2CPeripheral.h is includes in I2CKeypad.h
Hopefully there is a person out there that knows how to solve this.
Please let me know if you need more information.
Thanks.
I'm a beginner in cmake as I'm working with Visual Studio normally.
I'm trying to set up a project with two components, one inherits from the other.
The Structure of the Tree is attached.
The issue is that I get an error "undefined reference" for the Component I want to inherit from.
CMakeLists.txt are:
I2CKeypad:
idf_component_register(SRCS "I2CKeypad.cpp" INCLUDE_DIRS "." "../I2CPeripheral")
I2CPeripheral:
idf_component_register(SRCS "I2CPeripheral.cpp" INCLUDE_DIRS ".")
main:
idf_component_register(SRCS "main.cpp" INCLUDE_DIRS ".")
project:
cmake_minimum_required(VERSION 3.5)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(i2cKeypad)
I2CPeripheral.h is includes in I2CKeypad.h
Hopefully there is a person out there that knows how to solve this.
Please let me know if you need more information.
Thanks.