Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not compile on Arduino 1.0.6 #7

Open
peter-moran opened this issue Mar 17, 2016 · 0 comments
Open

Does not compile on Arduino 1.0.6 #7

peter-moran opened this issue Mar 17, 2016 · 0 comments

Comments

@peter-moran
Copy link

STLport-5.2-arduino-installed does not appear to work on Arduino 1.0.6. I followed the installation instructions from this wiki page on a brand new Arduino installation, but when I run the example code below, it does not compile.

#include <stlport.h>
#include <vector>
#include <cstdint>

std::vector<std::uint8_t> vec(10, 0);

void setup() {
    vec[0] = 5;
    vec[3] = 2;
    Serial.begin(115200);
}

void loop() {
    for (std::vector<uint8_t>::iterator it = vec.begin(), e = vec.end(); it != end; ++i) {
        Serial.println(*it);
    }
    sleep(2000);
}

Specifically, I get the errors:

sketch_mar17a:5: error: 'uint8_t' is not a member of 'std'
sketch_mar17a:5: error: 'uint8_t' is not a member of 'std'
sketch_mar17a:5: error: template argument 1 is invalid
sketch_mar17a:5: error: template argument 2 is invalid
sketch_mar17a:5: error: invalid type in declaration before '(' token
sketch_mar17a:5: error: initializer expression list treated as compound expression
sketch_mar17a.ino: In function 'void setup()':
sketch_mar17a:8: error: invalid types 'int[int]' for array subscript
sketch_mar17a:9: error: invalid types 'int[int]' for array subscript
sketch_mar17a.ino: In function 'void loop()':
sketch_mar17a:14: error: request for member 'begin' in 'vec', which is of non-class type 'int'
sketch_mar17a:14: error: request for member 'end' in 'vec', which is of non-class type 'int'
sketch_mar17a:14: error: 'end' was not declared in this scope
sketch_mar17a:14: error: 'i' was not declared in this scope
sketch_mar17a:17: error: 'sleep' was not declared in this scope

Is this a version specific error, and if so, what Arduino versions are supported?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant