Jump to content
rose

error: bits/c++config.h: No such file or directory

Recommended Posts

ive been trying to compile a sketch for about 3 days now, and ive finally gotten it down to one error,

 

In file included from C:\Users\Matt\Desktop\...\energia-0101E0010\hardware\msp430\libraries\TimerSerial/stdint.h:32:0,
                 from C:\Users\Matt\Desktop\...\energia-0101E0010\hardware\msp430\libraries\TimerSerial/inttypes.h:37,
                 from C:\Users\Matt\Desktop\...\energia-0101E0010\hardware\msp430\cores\msp430/TimerSerial.h:27,
                 from arduino.ino:1:
C:\Users\Matt\Desktop\...\energia-0101E0010\hardware\msp430\libraries\TimerSerial/tr1/cstdint:34:28: fatal error: bits/c++config.h: No such file or directory
compilation terminated.
 

 

i know 'c++config.h' needs  c++0x enabled to work, but i dont know how to enable it to compile with c++0x enabled. I dont care if certain things are out of date, i just need to know how to make this work.

if you need my original sketch for some reason, here it is,

 

 

#include <TimerSerial.h>

#include <inttypes.h>
#include <Servo.h>
#include <stdint.h>

Servo myServo;

const int servoPin = 9; // the pin the servo is connected to

int val = 0;    // a value accumulated from data on the serial port
int angle = 90; // the current angle of the servo



void setup()
{
  Serial.begin(4800);
  myServo.attach(servoPin);
  myServo.write(angle);  // center the servo
}


void loop()
{
  int value = map(analogRead(A0), 0, 1023, 0, 255);
  Serial.println(value);
  if ( Serial.available());
    {
    char ch = Serial.read();

    if(ch >= '0' && ch <= '9')        // is ch a number?
    val = val * 10 + ch - '0';        // yes, accumulate the value
    else if(ch == '-') // is this the minus sign?
    {
   angle = angle - val;
   if(angle < 0)
      angle = 0;
   myServo.write(angle);      // write the new angle
   val = 0;
    }
    else if(ch == '+') // is this the plus sign?
    {
   angle = angle + val;
   if(angle > 180)
      angle = 180;
   myServo.write(angle);      // write the new angle
   val = 0;
    }
  }
}
 

any help with the error would be appreciated, thanks.

 

edit: and by the way, im using the msp430g2231, and yes it is connected to a "serial" port, so to speak, this explains what i mean https://www.youtube.com/watch?v=1yEMZofNRyM

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...