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