Hi Ian,<div><br></div><div>You should be using rosmake, otherwise you'll have to manage ROS dependencies by hand (which must be a nightmare). Did you follow the tutorials before starting your project?</div><div><br></div>
<div>Tutorials 2 and 3 on creating and building ROS packages should be helpful:</div><div><a href="http://www.ros.org/wiki/ROS/Tutorials/CreatingPackage">http://www.ros.org/wiki/ROS/Tutorials/CreatingPackage</a></div><div>
<a href="http://www.ros.org/wiki/ROS/Tutorials/BuildingPackages">http://www.ros.org/wiki/ROS/Tutorials/BuildingPackages</a></div><div><br></div><div>Cheers,</div><div>Miguel.<br><br><div class="gmail_quote">2010/6/8 ibwood <span dir="ltr"><<a href="mailto:ianbenjiman@hotmail.com">ianbenjiman@hotmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br>
Hi all,<br>
<br>
I'm working on some C++ code and I have all of the files required to execute<br>
the project. The purpose of the code is to pass serial commands to a<br>
joystick to operate it. Now I know the code won't properly work without a<br>
joystick (I don't have one yet), I'm just trying to get the code compiled<br>
correctly using "g++ talker.cpp -o talker.exe" in the command line. NOTE: I<br>
have all of the header files located in the same package as the cpp code. My<br>
question is what is going wrong at compile time?<br>
<br>
Here is the resulting output:<br>
<br>
$ g++ joyTalker.cpp -o joyTalker.exe<br>
In file included from ros.h:40,<br>
                 from joyTalker.cpp:17:<br>
console.h:269:41: error: rosconsole/macros_generated.h: No such file or<br>
directory<br>
In file included from node_handle.h:40,<br>
                 from ros.h:45,<br>
                 from joyTalker.cpp:17:<br>
advertise_options.h:31:26: error: ros/forwards.h: No such file or directory<br>
In file included from node_handle.h:41,<br>
                 from ros.h:45,<br>
                 from joyTalker.cpp:17:<br>
advertise_service_options.h:32:40: error: ros/service_message_helper.h: No<br>
such file or directory<br>
In file included from publisher.h:32,<br>
                 from node_handle.h:32,<br>
                 from ros.h:45,<br>
                 from joyTalker.cpp:17:<br>
message.h: In static member function ‘static std::string<br>
ros::Message::__s_getDataType()’:<br>
message.h:63: error: ‘ROS_FATAL’ was not declared in this scope<br>
message.h: In static member function ‘static std::string<br>
ros::Message::__s_getMD5Sum()’:<br>
message.h:64: error: ‘ROS_FATAL’ was not declared in this scope<br>
message.h: In static member function ‘static std::string<br>
ros::Message::__s_getMessageDefinition()’:<br>
message.h:65: error: ‘ROS_FATAL’ was not declared in this scope<br>
In file included from node_handle.h:35,<br>
                 from ros.h:45,<br>
                 from joyTalker.cpp:17:<br>
service_client.h: In member function ‘bool ros::ServiceClient::call(MReq&,<br>
MRes&)’:<br>
service_client.h:66: error: there are no arguments to ‘ROS_FATAL’ that<br>
depend on a template parameter, so a declaration of ‘ROS_FATAL’ must be<br>
available<br>
service_client.h:66: note: (if you use ‘-fpermissive’, G++ will accept your<br>
code, but allowing the use of an undeclared name is deprecated)<br>
service_client.h:67: error: there are no arguments to ‘ROS_FATAL’ that<br>
depend on a template parameter, so a declaration of ‘ROS_FATAL’ must be<br>
available<br>
In file included from node_handle.h:41,<br>
                 from ros.h:45,<br>
                 from joyTalker.cpp:17:<br>
advertise_service_options.h: In member function ‘void<br>
ros::AdvertiseServiceOptions::init(const std::string&, const<br>
boost::function<bool(MReq&, MRes&)>&)’:<br>
advertise_service_options.h:76: error: there are no arguments to ‘ROS_FATAL’<br>
that depend on a template parameter, so a declaration of ‘ROS_FATAL’ must be<br>
available<br>
advertise_service_options.h:77: error: there are no arguments to ‘ROS_FATAL’<br>
that depend on a template parameter, so a declaration of ‘ROS_FATAL’ must be<br>
available<br>
<br>
Thanks for the help!<br>
--<br>
View this message in context: <a href="http://ros-users.122217.n3.nabble.com/Problem-compiling-C-file-locations-tp879449p879449.html" target="_blank">http://ros-users.122217.n3.nabble.com/Problem-compiling-C-file-locations-tp879449p879449.html</a><br>

Sent from the ROS-Users mailing list archive at Nabble.com.<br>
<br>
------------------------------------------------------------------------------<br>
ThinkGeek and WIRED's GeekDad team up for the Ultimate<br>
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the<br>
lucky parental unit.  See the prize list and enter to win:<br>
<a href="http://p.sf.net/sfu/thinkgeek-promo" target="_blank">http://p.sf.net/sfu/thinkgeek-promo</a><br>
_______________________________________________<br>
ros-users mailing list<br>
<a href="mailto:ros-users@lists.sourceforge.net">ros-users@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/ros-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/ros-users</a><br>
_______________________________________________<br>
ros-users mailing list<br>
<a href="mailto:ros-users@code.ros.org">ros-users@code.ros.org</a><br>
<a href="https://code.ros.org/mailman/listinfo/ros-users" target="_blank">https://code.ros.org/mailman/listinfo/ros-users</a><br>
</blockquote></div><br></div>