Standard Practice for including custom library in examples folder
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
I have created my custom library with examples
folder in them. The main header file is ABC_Node.h
. I am referring the structure of Adafruit libraries for Arduino and in some repos under the examples
folder I found a conflict for the inclusion of their header files.
Example
in some repos. they use double quotes (""
) for including their header files e.g. #include "Adafruit_SHT31.h"
SHT31test.ino
on the contrary, in their BNO055 Arduino library they use brackets (<>
) #include <Adafruit_BNO055.h>
BNO055 Bunny sketch
I locally tested my library on the IDE and I have examples in which my library is in #include "ABC_Node.h"
and it compiles without a problem.
Soon I wish to make the repository public and want to know if there is a standard practice for including header files for examples.
arduino-ide library
add a comment |Â
up vote
1
down vote
favorite
I have created my custom library with examples
folder in them. The main header file is ABC_Node.h
. I am referring the structure of Adafruit libraries for Arduino and in some repos under the examples
folder I found a conflict for the inclusion of their header files.
Example
in some repos. they use double quotes (""
) for including their header files e.g. #include "Adafruit_SHT31.h"
SHT31test.ino
on the contrary, in their BNO055 Arduino library they use brackets (<>
) #include <Adafruit_BNO055.h>
BNO055 Bunny sketch
I locally tested my library on the IDE and I have examples in which my library is in #include "ABC_Node.h"
and it compiles without a problem.
Soon I wish to make the repository public and want to know if there is a standard practice for including header files for examples.
arduino-ide library
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I have created my custom library with examples
folder in them. The main header file is ABC_Node.h
. I am referring the structure of Adafruit libraries for Arduino and in some repos under the examples
folder I found a conflict for the inclusion of their header files.
Example
in some repos. they use double quotes (""
) for including their header files e.g. #include "Adafruit_SHT31.h"
SHT31test.ino
on the contrary, in their BNO055 Arduino library they use brackets (<>
) #include <Adafruit_BNO055.h>
BNO055 Bunny sketch
I locally tested my library on the IDE and I have examples in which my library is in #include "ABC_Node.h"
and it compiles without a problem.
Soon I wish to make the repository public and want to know if there is a standard practice for including header files for examples.
arduino-ide library
I have created my custom library with examples
folder in them. The main header file is ABC_Node.h
. I am referring the structure of Adafruit libraries for Arduino and in some repos under the examples
folder I found a conflict for the inclusion of their header files.
Example
in some repos. they use double quotes (""
) for including their header files e.g. #include "Adafruit_SHT31.h"
SHT31test.ino
on the contrary, in their BNO055 Arduino library they use brackets (<>
) #include <Adafruit_BNO055.h>
BNO055 Bunny sketch
I locally tested my library on the IDE and I have examples in which my library is in #include "ABC_Node.h"
and it compiles without a problem.
Soon I wish to make the repository public and want to know if there is a standard practice for including header files for examples.
arduino-ide library
arduino-ide library
asked 38 mins ago
Shan-Desai
1488
1488
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
3
down vote
You can use either. There is no "standard".
When using a raw C compiler there is a difference between the two as regards the order in which directories are searched for files to include, but with the Arduino that is completely irrelevant, so either can be used.
Personally I use <...>
for libraries and "..."
for header files that form part of the sketch. It makes for easier identification of which is which, and conforms to the C standard of <...>
for system-installed headers, and "..."
for local headers.
me too :-) (123)
– Juraj
24 mins ago
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
You can use either. There is no "standard".
When using a raw C compiler there is a difference between the two as regards the order in which directories are searched for files to include, but with the Arduino that is completely irrelevant, so either can be used.
Personally I use <...>
for libraries and "..."
for header files that form part of the sketch. It makes for easier identification of which is which, and conforms to the C standard of <...>
for system-installed headers, and "..."
for local headers.
me too :-) (123)
– Juraj
24 mins ago
add a comment |Â
up vote
3
down vote
You can use either. There is no "standard".
When using a raw C compiler there is a difference between the two as regards the order in which directories are searched for files to include, but with the Arduino that is completely irrelevant, so either can be used.
Personally I use <...>
for libraries and "..."
for header files that form part of the sketch. It makes for easier identification of which is which, and conforms to the C standard of <...>
for system-installed headers, and "..."
for local headers.
me too :-) (123)
– Juraj
24 mins ago
add a comment |Â
up vote
3
down vote
up vote
3
down vote
You can use either. There is no "standard".
When using a raw C compiler there is a difference between the two as regards the order in which directories are searched for files to include, but with the Arduino that is completely irrelevant, so either can be used.
Personally I use <...>
for libraries and "..."
for header files that form part of the sketch. It makes for easier identification of which is which, and conforms to the C standard of <...>
for system-installed headers, and "..."
for local headers.
You can use either. There is no "standard".
When using a raw C compiler there is a difference between the two as regards the order in which directories are searched for files to include, but with the Arduino that is completely irrelevant, so either can be used.
Personally I use <...>
for libraries and "..."
for header files that form part of the sketch. It makes for easier identification of which is which, and conforms to the C standard of <...>
for system-installed headers, and "..."
for local headers.
answered 32 mins ago
Majenko♦
62.9k42873
62.9k42873
me too :-) (123)
– Juraj
24 mins ago
add a comment |Â
me too :-) (123)
– Juraj
24 mins ago
me too :-) (123)
– Juraj
24 mins ago
me too :-) (123)
– Juraj
24 mins ago
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2farduino.stackexchange.com%2fquestions%2f56810%2fstandard-practice-for-including-custom-library-in-examples-folder%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password