Breaking up a project in classes / files
hi,
i'm trying break larger project multiple files. read understand have create libraries this. right that?
in processing i'm used adding tab , creating class, doesn't seem work in arduino? new tab creates new pde file default arduino seems useless since won't import classes tabs main project seems.
i have tried create library using h , cpp files. problem seems library doesn't compile because depends on other libraries. don't know how solve this.
for testing created empty project uses myclass. myclass uses messenger. sketch includes
first created myclass.h , myclass.cpp , placed them next sketch. sketch includes myclass.h file.
with approach error:
23: error: messenger.h: no such file or director
apparently code trying compile include path not set same way main sketch?
then try put 2 myclass files in folder same name inside hardware/libraries/ folder. when this, , try compile get:
/applications/arduino.app/contents/resources/java/hardware/libraries/myclass/myclass.cpp:9: error: 'messenger' not declared in scope
what's that? how supposed create own classes depend on other libraries? not possible? i'm confused.
i'd rather not create library @ all. want break main sketch multiple files....
cheers
i'm trying break larger project multiple files. read understand have create libraries this. right that?
in processing i'm used adding tab , creating class, doesn't seem work in arduino? new tab creates new pde file default arduino seems useless since won't import classes tabs main project seems.
i have tried create library using h , cpp files. problem seems library doesn't compile because depends on other libraries. don't know how solve this.
for testing created empty project uses myclass. myclass uses messenger. sketch includes
first created myclass.h , myclass.cpp , placed them next sketch. sketch includes myclass.h file.
with approach error:
23: error: messenger.h: no such file or director
apparently code trying compile include path not set same way main sketch?
then try put 2 myclass files in folder same name inside hardware/libraries/ folder. when this, , try compile get:
/applications/arduino.app/contents/resources/java/hardware/libraries/myclass/myclass.cpp:9: error: 'messenger' not declared in scope
what's that? how supposed create own classes depend on other libraries? not possible? i'm confused.
i'd rather not create library @ all. want break main sketch multiple files....
cheers
why need broken multiple files?
Arduino Forum > Forum 2005-2010 (read only) > Software > Syntax & Programs > Breaking up a project in classes / files
arduino
Comments
Post a Comment