Go to Post What's the point of competing if you're not going to be competitive? - davepowers [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 11-01-2015, 09:10
dxc dxc is offline
Registered User
FRC #1551
 
Join Date: Jan 2013
Location: naples,ny
Posts: 5
dxc is an unknown quantity at this point
WPILib.h not found in 2015 eclipse

windows 7/64

we followed the instructions here http://wpilib.screenstepslive.com/s/4485/m/13810, then, after using the wizard to set up a test project, the code would not compile saying, among other things, WPILib.h not found.

the problem turned out to be the env var HOME was set to something other than whatever the default might be (because we sometimes use gvim which keeps its init files under $HOME). I found the installed WPILib.h by searching the entire c: drive; on my system it's under c:/Users/User/wpilib. in eclipse under window>preferences>c/c++>build>build variables you will find WPILIB is set to $HOME/wpilib. if you change WPILIB to c:/users/user/wpilib and reindex all works fine. I did not try instead moving the wpilib/* tree under $HOME because I was afraid it would mess up automatic updating.

I believe this happens because the installer uses $HOMEPATH as the location to install wpilib, but eclipse is set up to use $HOME to find it and these values may not be the same. I did quite a bit of wading around on the net without finding clear supporting evidence, all I know is the above fix worked for me.

<edit> it would be better if the installer put wpilib somewhere specified at install time with a default like c:\wpilib or similar (similar to the way c:\frc works). the HOME/HOMEPATH issue will be a problem on any machine where more than one login exists.

Last edited by dxc : 11-01-2015 at 09:49. Reason: add suggestion
Reply With Quote
  #2   Spotlight this post!  
Unread 11-01-2015, 09:32
dxc dxc is offline
Registered User
FRC #1551
 
Join Date: Jan 2013
Location: naples,ny
Posts: 5
dxc is an unknown quantity at this point
Re: WPILib.h not found in 2015 eclipse

one more thing, this happened to us on two machines. one had several years of install/uninstall cycles on it (and hence unknown registry crud, etc), but the other had never had a wpilib install, i.e. for this purpose it was completely clean. the modified value of HOME is what they had in common.
Reply With Quote
  #3   Spotlight this post!  
Unread 17-01-2015, 01:30
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,543
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: WPILib.h not found in 2015 eclipse

I'm not sure that there is an easy cross-platform solution to the user specifying $HOME, which overrides eclipse's default.

Installing to the user's directory makes installation and updates possible without administrative rights, which makes it possible to install on many locked down configurations like you might find at a school. Java has always been like this.
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 09:55.

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