user35534: I wrote a library that I intend to use in several project and I published it via platform.io's library management system.
https://platformio.org/lib/show/12820/FastLED-SectionManager
This is the first time I've published via platform.io (first time I've published any c++ library). I read over platform.io's docs on creating a library and structured my library accordingly with my headers in the include directory and the implementation files in the src directory:

And created the following library.json file:
{
  "name": "FastLED-SectionManager",
  "version": "1.0.2",
  "description": "A led strip index manager that allows for logical groupings of strip sections.",
  "repository": {
    "type": "git",
    "url": "git@github.com:chris-schmitz/FastLED-Section-Manager.git"
  },
  "authors": [
    {
      "name": "Christopher Schmitz",
      "email": "schmitz.chris@gmail.com",
      "url": "https://light-inspiration.com/"
    }
  ],
  "homepage": "https://github.com/chris-schmitz/FastLED-Section-Manager",
  "license": "MIT",
  "dependencies": {
    "fastled/FastLED": "^3.4.0"
  },
  "frameworks": "*",
  "platforms": "*"
}

The problem that I'm running into is that when I install the library in a different project via platform.io and try to include a header, the header can't be found:

I double checked in the pio directory for the project and I can definitely see the header and implementation files:

So I'm not sure why platform.io can't find the headers.
I can't quite tell what I'm doing wrong. any ideas?

user35534: I woke up this morning and looked back at the documentation.
A part I mis-read was this:

We recommend to use src folder for your C/C++ source files and include folder for your headers. You can also have nested sub-folders in src or include.

I had my headers stored in the lib folder :facepalm:
I tried to search around in the platformio docs for the explanation of the lib vs include vs src folders (I knew I saw it at one point) but couldn't find it.
I then remembered that I read the purpose of each directory in the Readme files in the project structure itself generated when you create a new platformio project:

The gist being:

src: your compiled files, i.e. your cpp files

It's worth noting that you could just shove all of the files in here and it would work


lib: libraries private to your project/library itself
include: declaration and macro definition files, i.e. your header files

This explains how the header files in the lib directory worked in the SectionManager project itself but didn't work when using the SectionManager as an installed library; the lib directory is only "visible" local to a project, so when I tried to include the header files from another project they couldn't be found.
So in my SectionManager project I moved the headers to the include directory, bumped the version number, and published:

Then I switched to my main project that I'm pulling the SectionManager library into, adjusted the dependency version to include the minor bump, updated, and now it works!

Makes sense, I'm just still getting used to c++ and platform.io.

35534: <p>I wrote a library that I intend to use in several project and I published it via platform.io's library management system.</p>
<p><a href="https://platformio.org/lib/show/12820/FastLED-SectionManager" rel="nofollow noreferrer">https://platformio.org/lib/show/12820/FastLED-SectionManager</a></p>
<p>This is the first time I've published via platform.io (first time I've published any c++ library). I read over <a href="https://docs.platformio.org/en/latest/librarymanager/creating.html" rel="nofollow noreferrer">platform.io's docs on creating a library</a> and structured my library accordingly with my headers in the <code>include</code> directory and the implementation files in the <code>src</code> directory:</p>
<p><a href="https://i.stack.imgur.com/47j1W.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/47j1W.png" alt="enter image description here" /></a></p>
<p>And created the following library.json file:</p>
<pre><code>{
  &quot;name&quot;: &quot;FastLED-SectionManager&quot;,
  &quot;version&quot;: &quot;1.0.2&quot;,
  &quot;description&quot;: &quot;A led strip index manager that allows for logical groupings of strip sections.&quot;,
  &quot;repository&quot;: {
    &quot;type&quot;: &quot;git&quot;,
    &quot;url&quot;: &quot;git@github.com:chris-schmitz/FastLED-Section-Manager.git&quot;
  },
  &quot;authors&quot;: [
    {
      &quot;name&quot;: &quot;Christopher Schmitz&quot;,
      &quot;email&quot;: &quot;schmitz.chris@gmail.com&quot;,
      &quot;url&quot;: &quot;https://light-inspiration.com/&quot;
    }
  ],
  &quot;homepage&quot;: &quot;https://github.com/chris-schmitz/FastLED-Section-Manager&quot;,
  &quot;license&quot;: &quot;MIT&quot;,
  &quot;dependencies&quot;: {
    &quot;fastled/FastLED&quot;: &quot;^3.4.0&quot;
  },
  &quot;frameworks&quot;: &quot;*&quot;,
  &quot;platforms&quot;: &quot;*&quot;
}
</code></pre>
<p>The problem that I'm running into is that when I install the library in a different project via platform.io and try to include a header, the header can't be found:</p>
<p><a href="https://i.stack.imgur.com/C2m7k.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/C2m7k.png" alt="can't find header" /></a></p>
<p>I double checked in the <code>pio</code> directory for the project and I can definitely see the header and implementation files:</p>
<p><a href="https://i.stack.imgur.com/Wp7xi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Wp7xi.png" alt="enter image description here" /></a></p>
<p>So I'm not sure why platform.io can't find the headers.</p>
<p>I can't quite tell what I'm doing wrong. any ideas?</p>
 35534: <p>I woke up this morning and looked back at the documentation.</p>
<p>A part I mis-read was this:</p>
<blockquote>
<p>We recommend to use src folder for your C/C++ source files and <strong>include folder for your headers</strong>. You can also have nested sub-folders in src or include.</p>
</blockquote>
<p>I had my headers stored in the <code>lib</code> folder :facepalm:</p>
<p>I tried to search around in the platformio docs for the explanation of the lib vs include vs src folders (I knew I saw it at one point) but couldn't find it.</p>
<p>I then remembered that I read the purpose of each directory in the Readme files in the project structure itself generated when you create a new platformio project:</p>
<p><a href="https://i.stack.imgur.com/5hBkX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5hBkX.png" alt="readmes" /></a></p>
<p>The gist being:</p>
<ul>
<li><code>src</code>: your compiled files, i.e. your <code>cpp</code> files
<ul>
<li>It's worth noting that you could just shove all of the files in here and it would work</li>
</ul>
</li>
<li><code>lib</code>: libraries private to your project/library itself</li>
<li><code>include</code>: declaration and macro definition files, i.e. your header files</li>
</ul>
<p>This explains how the header files in the <code>lib</code> directory worked in the SectionManager project itself but didn't work when using the SectionManager as an installed library; the <code>lib</code> directory is only &quot;visible&quot; local to a project, so when I tried to include the header files from another project they couldn't be found.</p>
<p>So in my SectionManager project I moved the headers to the <code>include</code> directory, bumped the version number, and published:</p>
<p><a href="https://i.stack.imgur.com/yNldk.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yNldk.jpg" alt="update to lib directory" /></a></p>
<p>Then I switched to my main project that I'm pulling the SectionManager library into, adjusted the dependency version to include the minor bump, updated, and now it works!</p>
<p><a href="https://i.stack.imgur.com/VNK2i.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VNK2i.png" alt="works!" /></a></p>
<p>Makes sense, I'm just still getting used to c++ and platform.io.</p>
