Go to Post We didn't need a championship to recognize the kids on our [little league] team and we sure didn't need one to inspire them. If you want to go to the championships then work harder, don't try and lessen the value of the championships by letting everyone in. - FarmerJohn [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 15-01-2014, 19:24
truffly truffly is offline
Registered User
FRC #3926
 
Join Date: Jan 2014
Location: Minnesota
Posts: 1
truffly is an unknown quantity at this point
WPILib.h not found

I recently installed WindRiver on my laptop (I am using Windows 7), and had a problem with g++. Figured that out, was able to build the project, but with errors -- when I go to include WPILib, I get an error saying

Code:
g++: unrecognized option `-MP'
C:/WindRiver/workspace/2014RobotCode/MyRobot.cpp:1: WPILib.h: No such file or directory
C:\WindRiver\utilities-1.0\x86-win32\bin\make.exe: *** [2014RobotCode/Debug/Objects/2014RobotCode/MyRobot.o] Error 1
Build Failed in Project '2014RobotCode' (Process Exit Value was 2):   2014-01-15 18:17:16   (Elapsed Time: 00:00)
I tried including WPILib.h through vxWorks, but then it returns a whole list of errors because it can't find a ton of files included in WPILib.h ... I have the workbench update installed, I installed the 2014 driver station, wind river update, and I'm stuck. Any ideas on a fix? A mentor suggested re-installing everything, but...hoping to avoid that.
Reply With Quote
  #2   Spotlight this post!  
Unread 16-01-2014, 14:54
William Kunkel William Kunkel is offline
Programming Lead
AKA: Kunkel
FRC #0422 (Mech Tech Dragons)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2011
Location: Richmond, VA
Posts: 94
William Kunkel is an unknown quantity at this point
Re: WPILib.h not found

What are your build settings for the project? Right-click on the project in the file tree and go down to "Properties". Under "Build Properties" > "Paths", you should have these three include directories:
Quote:
-I$(WIND_BASE)/target/h/coreip
-I$(WIND_BASE)/target/h/WPILib
-I$(WIND_BASE)/target/h
Under "Build Properties" > "Libraries" you'll need
Quote:
$(WIND_BASE)/target/lib/WPILib.a
Make sure you have those settings in place.
Reply With Quote
  #3   Spotlight this post!  
Unread 16-01-2014, 19:05
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 588
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
Re: WPILib.h not found

Did you create your project based on one of the sample robot projects? Those should have all the paths and project options set up to work. The steps for doing that are here:

http://wpilib.screenstepslive.com/s/...-robot-project

Try one of those and verify that it compiles correctly. Then add your code to that project.
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
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:05.

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