View Single Post
  #5   Spotlight this post!  
Unread 22-01-2007, 08:34
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 590
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: EasyC OI Inputs?

Quote:
Originally Posted by mluckham View Post
Brad,

I tried including the WPILib downloaded from Internet (I did run the setup script that came with that).

Following the EasyC tutorial to "Add a Library", we found that the Add Library failed in EasyC due to a pre-existing definition for TwoWheelDrive() in API.H.

As a result, there is no Drive() function available.

Any suggestions?
The problem is that the easyC guys added an identical set of functions as block code. And it's documented all over the place in the help file and examples so they didn't want to change/remove it. So if you're using easyC you can use their functions and if you're using WPILib with some other development environment (MPLab or eclipse) you can use the ones built in.

The way I resolved the name conflicts was to add the file "BuiltIns.h" which only contain definitions for the Drive functions, then include "API.h" which has everything else. So use "BuiltIns.h" if you are using MPLab and "API.h" if you are using easyC and plan on importing the block-code versions of the functions.

Brad
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute