View Single Post
  #2   Spotlight this post!  
Unread 25-01-2012, 00:49
grantf's Avatar
grantf grantf is offline
Software Engineering Mentor
FRC #4061 (SciBorgs)
Team Role: Engineer
 
Join Date: Feb 2007
Rookie Year: 2005
Location: Pullman, WA
Posts: 16
grantf has a spectacular aura aboutgrantf has a spectacular aura about
Re: Command based programming problem

Quote:
Originally Posted by TomThompson View Post
We are trying to use the new command-based system in C++. We are getting an error on build that we think might be related to the Command.h file. It is not in the commands directory but there is no way of knowing whether WIPLib actually includes this. None of the classes that eventually inherit Command are recognized.

Tom
Hi Tom,
This is a simple include path problem. Open WindRiver and right-click on your project, then choose "Properties". Across the top of the next window, you will see a bunch of tabs, one of which is called "Paths", click on it. In the middle of that window, you should see 3 entries in a table that all look like -I$(WIND_BASE)/target/h/... Click the "Add" button on the right, and in the new row, put -I$(WIND_BASE)/target/h/WPILib/Commands. This will add an automatic include path to your build system so files will be able to see "Command.h" and "Subsystem.h" etc.

Alternatively, you could #include those files explicitly by doing this in your source files:
#include "Commands/Command.h"
#include "Commands/Subsystem.h"

Hope that helps
Grant
Reply With Quote