ROS & VC++ 2010 (Errors) [closed]

asked 2013-05-22 18:02:48 -0500

CroCo gravatar image

updated 2014-04-20 14:09:27 -0500

ngrennan gravatar image
This is what I did to install ROS in VC++ 2010.
**First:**
Python packages:
1- Python 2.7.2 : add C:\Python27\ and C:\Python27\Scripts to your PATH.
2- PyWin32 217
3- PyYaml 3.10
4- PySetupTools 0.6c11
5- Rospkg 1.0.6
The sdk:
WinRos Sdk 0.1.3 - extract into C:\opt
These steps in this link:
http://www[dot]ros[dot]org/wiki/win_ros/Msvc%20SDK%20-%20Fuerte

**Second:**
I set my project in VC++ 2010 exactly as the following link suggests 
http://www[dot]ros[dot]org/wiki/win_ros/Msvc%20SDK%20Projects%20-%20Fuerte

I'm getting error with this header file ( #include <sys/time.h> ) 
I think this header file should be ( #include <sys/timeb.h> )
I tried to replace it and it worked however, I got the following errors

1>c:\opt\ros\fuerte\x86\include\ros\service_client.h(180): error C3861: '__builtin_expect': identifier not found 1>c:\opt\ros\fuerte\x86\include\ros\service_client.h(180): error C3861: '__builtin_expect': identifier not found 1>c:\opt\ros\fuerte\x86\include\ros\service_client.h(180): error C3861: '__builtin_expect': identifier not found 1>c:\opt\ros\fuerte\x86\include\ros\service_client.h(180): error C3861: '__builtin_expect': identifier not found 1>c:\users\croco\documents\ros\ros\timer\main.cpp(5): error C3861: '__builtin_expect': identifier not found 1>c:\users\croco\documents\ros\ros\timer\main.cpp(5): error C3861: '__builtin_expect': identifier not found 1>c:\users\croco\documents\ros\ros\timer\main.cpp(5): error C3861: '__builtin_expect': identifier not found 1>c:\users\croco\documents\ros\ros\timer\main.cpp(5): error C3861: '__builtin_expect': identifier not found 1>c:\users\croco\documents\ros\ros\timer\main.cpp(10): error C3861: '__builtin_expect': identifier not found 1>c:\users\croco\documents\ros\ros\timer\main.cpp(10): error C3861: '__builtin_expect': identifier not found 1>c:\users\croco\documents\ros\ros\timer\main.cpp(10): error C3861: '__builtin_expect': identifier not found 1>c:\users\croco\documents\ros\ros\timer\main.cpp(10): error C3861: '__builtin_expect': identifier not found


When I double click on the line, it shows me the following error

  --->   ROS_ERROR
and in the main function 
  --->   ROS_INFO



Also, I copied and pasted all .dll in system, so vc++ knows where they are. 
What did I do wrong? 
and this is the sample that I'm trying to execute 

#include <ros/ros.h>

void callback1(const ros::TimerEvent&)
{
    ROS_INFO("Callback 1 triggered");
}

void callback2(const ros::TimerEvent&)
{
    ROS_INFO("Callback 2 triggered");
}

int main(int argc, char** argv)
{
    ros::init(argc, argv, "talker");
    ros::NodeHandle n;
    ros::Timer timer1 = n.createTimer(ros::Duration(0.1), callback1);
    ros::Timer timer2 = n.createTimer(ros::Duration(1.0), callback2);

    ros::spin();
    return 0;
}
edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by tfoote
close date 2014-07-03 18:54:08.787548

Comments

UP UP Please

CroCo gravatar image CroCo  ( 2013-05-25 01:14:08 -0500 )edit