include a header file thats common to more than one program

08 Nov 2011

How do I acheive this in the web compiler i.e. have a common include file that has standard defines etc and share it in the program workspace?

I having a single file include file to maintain is a lot easier than having copies scattered about.

Thanks. Martin

08 Nov 2011

Hi Martin,

All programs are self contained, with the primary aim to make sharing more consistent, so you can't "reference" files in one program to another.

If you publish a file/folder as a library, any other program can import it and update with a single click, but you can't explicitly share between different programs. I don't think we plan to change this model. we are working to improve the publishing/importing to support real distributed version control which should be great for collaboration (just taking a while to get it all working how we want! But hopefully very worth the effort!)

Simon

09 Nov 2011

Hi, Thank you for your reply. Indeed the use of library promotes code reuse but the web based compiler does not allow the use of release or debug versions of a library in a project based on compiler settings (release or debug as far as I am aware) as would be the case with a compiler such as visual studios c++ compiler.

Using the preprocessor to determine release or debug versions of various macros in a common include file for all projects allows for functionality such as outputing debug info to the serial port (debug only) whuch can not be acheived with a staticly linked library or can it?.

Thanks. Martin