Go to Post To think that one can "learn" engineering in 6 weeks while under the strain of building a robot too is proposterous. FIRST isn't about teaching. It's about inspiring. - Collin Fultz [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 21-01-2012, 16:08
TomThompson TomThompson is offline
Registered User
FRC #0847
 
Join Date: Jan 2010
Location: Philomath, Oregon
Posts: 23
TomThompson is an unknown quantity at this point
Command based programming problem

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
Reply With Quote
  #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
  #3   Spotlight this post!  
Unread 25-01-2012, 01:24
TomThompson TomThompson is offline
Registered User
FRC #0847
 
Join Date: Jan 2010
Location: Philomath, Oregon
Posts: 23
TomThompson is an unknown quantity at this point
Re: Command based programming problem

I appreciate the response, Grant. Although I haven't tried your first suggestion, the include statements were present in the code and we still had the problem. Have you used the new command based sample template in C++? The line of code that is giving us an error was actually generated by the wizard.

Tom Thompson
Reply With Quote
  #4   Spotlight this post!  
Unread 25-01-2012, 01:34
bob.wolff68's Avatar
bob.wolff68 bob.wolff68 is offline
Da' Mentor Man
FRC #1967
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2007
Location: United States
Posts: 157
bob.wolff68 is just really nicebob.wolff68 is just really nicebob.wolff68 is just really nicebob.wolff68 is just really nicebob.wolff68 is just really nice
Re: Command based programming problem

FYI -- I just gave a try at compiling the template/example CommandBasedRobotTemplate and it compiled fine for me.

bob
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 12:58.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi