Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Split long code into different smaller files
20-02-2013, 10:17 PM, (This post was last modified: 20-02-2013, 10:18 PM by luisonoff.)
#1
Split long code into different smaller files
Hello!
I have a long code and the IDE slows down when scrolling it, that's why i would like to break it into smaller files. Also it would be easier to read.

Arduino IDE has that feature called "Multitab file".
You can split code into different files, but compiler reads them like one file, putting one after the other, so you don't have to worry for functions or variables defined in different files.

Is there anything similar in Pinguino? Thank you lots!

PD: I have tried creating .pde file containing only functions, and it works... until one of those functions needs the I2C library. Seems like IDE is not linking core libraries in files containing only functions. I also tried to include those libraries manually (i2c.c) in the function's file, but then I get linking errors... Sad
Reply
25-02-2013, 10:29 AM,
#2
RE: Split long code into different smaller files
No such feature with Pinguino at that moment but we are trying to improve IDE efficiency to manage long code.

(20-02-2013, 10:17 PM)luisonoff Wrote: Hello!
I have a long code and the IDE slows down when scrolling it, that's why i would like to break it into smaller files. Also it would be easier to read.

Arduino IDE has that feature called "Multitab file".
You can split code into different files, but compiler reads them like one file, putting one after the other, so you don't have to worry for functions or variables defined in different files.

Is there anything similar in Pinguino? Thank you lots!

PD: I have tried creating .pde file containing only functions, and it works... until one of those functions needs the I2C library. Seems like IDE is not linking core libraries in files containing only functions. I also tried to include those libraries manually (i2c.c) in the function's file, but then I get linking errors... Sad
It is easier to complain than it is to do, but it is better to do than it is to complain.
Reply
25-02-2013, 04:53 PM,
#3
RE: Split long code into different smaller files
I have the same problem and usually gets slower on Windows 7. I use version 399 .

The best chance is to write external libraries, so your main gets smaller.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)