Hey, so I had been coding on the Arduino IDE for a long time and just decided to switch to C++ compiler. I tried to include the standard Arduino.h. However, it kept giving me errors so I tried to include a few more libraries. Do I have to include each header individually? If so, why does it give me an error about not being able to find "tpaste.h"? Note: I do have the Arduino master folder in the MinGW "include" folder.
age_of_reason:
Hey, so I had been coding on the Arduino IDE for a long time and just decided to switch to C++ compiler.
The Arduino IDE uses a C++ compiler (gcc), so the above statement is nonsense.
Whandall:
The Arduino IDE uses a C++ compiler (gcc), so the above statement is nonsense.
He obviously means some other compiler than (more specifically) avr-gcc/Arduino toolchain.
@age_of_reason there are some pointers here on hacking together your own toolchain. Though not comprehensive, the link includes your finding the headers you will need.
BulldogLowell:
He obviously means some other compiler than (more specifically) avr-gcc/Arduino toolchain.
You are probably correct. But it seems to be a strange thing to do. I am not aware of any deficiencies in the avr-gcc compiler.
...R
Robin2:
You are probably correct. But it seems to be a strange thing to do. I am not aware of any deficiencies in the avr-gcc compiler....R
It isn't really a compiler question, rather a toolchain/dev environment question.
The Arduino IDE is lacking a lot of what more modern programming dev kits have:
- smart syntax highlighting for variables, functions, classes objects....
- in-line real-time compiling
- versioning
- code assistance (function templates)
- better search/replace tools
- debug tools
- project creation (directory management and library management)
- macro tools
- and so on...
On the other hand, the Arduino Dev Kit has a checkmark icon to compile, so, there's that.
BulldogLowell:
It isn't really a compiler question, rather a toolchain/dev environment question.
It had crossed my mind that that was what the OP was really enquiring about. But he specifically said "compiler".
Precision is a sine-qua-non for successful programming
...R
Robin2:
It had crossed my mind that that was what the OP was really enquiring about. But he specifically said "compiler".
The photo he attached showed the NetBeans development environment (which has many of the features I mentioned above plus plus).
People often use the term "compiler" as an analogue for IDE and vice versa. As such, OP used the two terms synonymously in the same sentence "specifically" (your term) referring to the "Arduino IDE" and "C++ compiler."
The power of the deductive mind enable one to infer that he is trying to get his NetBeans IDE to compile code for his Arduino.
If the OP looks hard enough, he will see that what he is asking to is possible and in fact a couple of approaches are already in the Arduino Playground.
Reading and looking at everything the OP posted would be a sine-qua-non for a reasonable response, I guess.
or, we could each choose to be a pisser and argue semantics, on our way to the mysterious topic's denouement.
BulldogLowell:
The power of the deductive mind
I musta been missin' the day them things was gave out
...R
Robin2:
I musta been missin' the day them things was gave out
Karma++
BulldogLowell:
Reading and looking at everything the OP posted would be a sine-qua-non for a reasonable response, I guess.
Which is less hard after such (NetBeans) info was added to the OP.
There was no hint to another IDE in the original post.
BulldogLowell:
The photo he attached showed the NetBeans development environment (which has many of the features I mentioned above plus plus).
There is an Arduino plugin for Netbeans. Google will find it together with the installation instructions.