Issue finding standard library includes using external component
Posted: Tue Apr 18, 2023 9:10 am
Hi,
I have created an external component in ESP which is for my common code, and therefore I do not want to put it in the components folder of my main project. Doing this I have a problem in the external component whereby it cannot find any standard library at all.
My main project has no problem.
Is there a way of forcing my external component to find the standard library includes?
In my main project CMakeLists.txt I have included - list(APPEND EXTRA_COMPONENT_DIRS "../custom_external_component"), which builds find but the IDE still cannot find the includes in the component. Do I need to add anything specific to my CMakeLists.txt file in my external component?
Project layout:
- MainProject
- CMakeLists.txt
- Main
- Some source files
- CMakeLists.txt
- ExternalComponent
- Code
- CMakeLists.txt
Any help is appreciated!
I have created an external component in ESP which is for my common code, and therefore I do not want to put it in the components folder of my main project. Doing this I have a problem in the external component whereby it cannot find any standard library at all.
My main project has no problem.
Is there a way of forcing my external component to find the standard library includes?
In my main project CMakeLists.txt I have included - list(APPEND EXTRA_COMPONENT_DIRS "../custom_external_component"), which builds find but the IDE still cannot find the includes in the component. Do I need to add anything specific to my CMakeLists.txt file in my external component?
Project layout:
- MainProject
- CMakeLists.txt
- Main
- Some source files
- CMakeLists.txt
- ExternalComponent
- Code
- CMakeLists.txt
Any help is appreciated!