Skip to main content
Arduino

Return to Question

Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Better ASCII art.
Source Link
Edgar Bonet
  • 45.1k
  • 4
  • 42
  • 81

My Arduino/PlatformIO libraries folder

libraries

l_cleaner_robot

l_TB6612_Dual

l_tb6612_dual.h

l_tb6612_dual.cpp

libraries
└── cleaner_robot
 └── TB6612_Dual
 ├── tb6612_dual.h
 └── tb6612_dual.cpp

I used this code to innclude it:

#include <TB6612_Dual/tb6612_dual.h>

But the compilation has errors like "undefinded variables, undefinded reference,...etc"

This is my sketch folder

Cleaner_Robot l_src

l_TB6612_Dual

l_tb6612_dual.cpp

l_tb6612_dual.h

Cleaner_Robot
└── src
 └── TB6612_Dual
 ├── tb6612_dual.cpp
 └── tb6612_dual.h

If i use this code, all is ok

#include "src/libs/TB6612_Dual/tb6612_dual.h"

So the question is how to include if header file is in a sub folder of a folder in libraries folder of Arduino/PlatformIO ?, i has searched for many things, but cant help. I also read about src folder allowed in Arduino, but where can find an official announcement/manual for this structure ?, cant find much about this

Thanks :)

My Arduino/PlatformIO libraries folder

libraries

l_cleaner_robot

l_TB6612_Dual

l_tb6612_dual.h

l_tb6612_dual.cpp

I used this code to innclude it:

#include <TB6612_Dual/tb6612_dual.h>

But the compilation has errors like "undefinded variables, undefinded reference,...etc"

This is my sketch folder

Cleaner_Robot l_src

l_TB6612_Dual

l_tb6612_dual.cpp

l_tb6612_dual.h

If i use this code, all is ok

#include "src/libs/TB6612_Dual/tb6612_dual.h"

So the question is how to include if header file is in a sub folder of a folder in libraries folder of Arduino/PlatformIO ?, i has searched for many things, but cant help. I also read about src folder allowed in Arduino, but where can find an official announcement/manual for this structure ?, cant find much about this

Thanks :)

My Arduino/PlatformIO libraries folder

libraries
└── cleaner_robot
 └── TB6612_Dual
 ├── tb6612_dual.h
 └── tb6612_dual.cpp

I used this code to innclude it:

#include <TB6612_Dual/tb6612_dual.h>

But the compilation has errors like "undefinded variables, undefinded reference,...etc"

This is my sketch folder

Cleaner_Robot
└── src
 └── TB6612_Dual
 ├── tb6612_dual.cpp
 └── tb6612_dual.h

If i use this code, all is ok

#include "src/libs/TB6612_Dual/tb6612_dual.h"

So the question is how to include if header file is in a sub folder of a folder in libraries folder of Arduino/PlatformIO ?, i has searched for many things, but cant help. I also read about src folder allowed in Arduino, but where can find an official announcement/manual for this structure ?, cant find much about this

Thanks :)

Source Link

src folder in sketch structure and include library from subfolder

My Arduino/PlatformIO libraries folder

libraries

l_cleaner_robot

l_TB6612_Dual

l_tb6612_dual.h

l_tb6612_dual.cpp

I used this code to innclude it:

#include <TB6612_Dual/tb6612_dual.h>

But the compilation has errors like "undefinded variables, undefinded reference,...etc"

This is my sketch folder

Cleaner_Robot l_src

l_TB6612_Dual

l_tb6612_dual.cpp

l_tb6612_dual.h

If i use this code, all is ok

#include "src/libs/TB6612_Dual/tb6612_dual.h"

So the question is how to include if header file is in a sub folder of a folder in libraries folder of Arduino/PlatformIO ?, i has searched for many things, but cant help. I also read about src folder allowed in Arduino, but where can find an official announcement/manual for this structure ?, cant find much about this

Thanks :)

lang-cpp

AltStyle によって変換されたページ (->オリジナル) /