Quote:
Originally Posted by TomThompson
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