Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Cyborg)
  • No Skin
Collapse
Brand Logo

CIRCLE WITH A DOT

  1. Home
  2. Uncategorized
  3. I keep forgetting how horrible it is to code in C/C++ between my arduino projects.

I keep forgetting how horrible it is to code in C/C++ between my arduino projects.

Scheduled Pinned Locked Moved Uncategorized
programmingcpparduino
3 Posts 2 Posters 0 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • gundersen@mastodon.socialG This user is from outside of this forum
    gundersen@mastodon.socialG This user is from outside of this forum
    gundersen@mastodon.social
    wrote last edited by
    #1

    I keep forgetting how horrible it is to code in C/C++ between my arduino projects. Here is a story from yesterday, debugging a very peculiar error from the compiler:

    Error: 'fs' was not declared in this scope; did you mean 'fs::FS'?

    This was from a very popular library, so it's weird that I got this error. Googled AI suggested I declare the namespace at the top of the file, but that felt wrong. Why wasn't anyone else getting this error?

    #programming #cpp #arduino

    gundersen@mastodon.socialG ruenahcmohr@infosec.exchangeR 2 Replies Last reply
    0
    • gundersen@mastodon.socialG gundersen@mastodon.social

      I keep forgetting how horrible it is to code in C/C++ between my arduino projects. Here is a story from yesterday, debugging a very peculiar error from the compiler:

      Error: 'fs' was not declared in this scope; did you mean 'fs::FS'?

      This was from a very popular library, so it's weird that I got this error. Googled AI suggested I declare the namespace at the top of the file, but that felt wrong. Why wasn't anyone else getting this error?

      #programming #cpp #arduino

      gundersen@mastodon.socialG This user is from outside of this forum
      gundersen@mastodon.socialG This user is from outside of this forum
      gundersen@mastodon.social
      wrote last edited by
      #2

      A bit more Googling gave me a forum post with the solution: swap the order of these two imports:

      #include <TFT_eSPI.h>
      #include <WifiManager.h>

      They both rely on the same #define so the wrong order makes the second one do something wrong.

      Global definitions where multiple libraries can decide to use the same name is such wonderful fun...

      1 Reply Last reply
      0
      • gundersen@mastodon.socialG gundersen@mastodon.social

        I keep forgetting how horrible it is to code in C/C++ between my arduino projects. Here is a story from yesterday, debugging a very peculiar error from the compiler:

        Error: 'fs' was not declared in this scope; did you mean 'fs::FS'?

        This was from a very popular library, so it's weird that I got this error. Googled AI suggested I declare the namespace at the top of the file, but that felt wrong. Why wasn't anyone else getting this error?

        #programming #cpp #arduino

        ruenahcmohr@infosec.exchangeR This user is from outside of this forum
        ruenahcmohr@infosec.exchangeR This user is from outside of this forum
        ruenahcmohr@infosec.exchange
        wrote last edited by
        #3

        @gundersen oh Arduino code is horrid, and hey, dont blame C its flat and doesn't take much effort to find anything.

        1 Reply Last reply
        1
        0
        • R relay@relay.infosec.exchange shared this topic
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups