Go to Post I check Chief Delphi more often than I check Facebook and Twitter combined. It's probably unhealthy actually... - Ginger Power [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 07-02-2009, 18:46
superspork22 superspork22 is offline
Registered User
FRC #2845 (O-Botics)
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Osseo Senior High
Posts: 6
superspork22 is an unknown quantity at this point
Multiple definitions in some C functions?

Hey Forums.

With the traditional C wrappers provided from WPI, I have found what I think what might be a bug and need to find a workaround.

IsAutonomous(), IsOperatorControl(), and IsDisabled() seem to all be both defined in SimpleCRobot.cpp and in CDriverStation.cpp. I can't just not use SimpleCRobot because that's the only place that the watchdog functions are defined... I could go without them, but it really doesn't seem like a good idea.

Ideas, or am I doing something wrong here?
Reply With Quote
  #2   Spotlight this post!  
Unread 07-02-2009, 18:58
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
Re: Multiple definitions in some C functions?

in the simple robot, they are defined for ease of use, you dont have to create a DS instance, if you look at the code, the simple robot, they are wrappers for the DS functions
__________________
Bubble Wrap: programmers rewards
Watchdog.Kill();
printf("Watchdog is Dead, Celebrate!");
How to make a self aware robot: while (∞) cout<<(sqrt(-∞)/-0);
Previously FRC 451 (The Cat Attack)
Now part of the class of 2016 at WPI & helping on WPILib
Reply With Quote
  #3   Spotlight this post!  
Unread 07-02-2009, 23:23
superspork22 superspork22 is offline
Registered User
FRC #2845 (O-Botics)
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Osseo Senior High
Posts: 6
superspork22 is an unknown quantity at this point
Re: Multiple definitions in some C functions?

Let me clarify some: I need to use the Driver Station part for the digital inputs. However, it also seems that one needs to use SimpleCRobot in the project for the watchdog timer. The conflicting functions are defined in both.

Perhaps this would work better if we knew C++, eh? ^_^''''
Reply With Quote
  #4   Spotlight this post!  
Unread 08-02-2009, 09:00
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
Re: Multiple definitions in some C functions?

Yes! you need C++ to do that, and C++ is also called C with Classes.
but you don't need the DS to do that,
you should use the DigitalInput class, and it should work in C(I think)
but for next season, learn C++, much easier
__________________
Bubble Wrap: programmers rewards
Watchdog.Kill();
printf("Watchdog is Dead, Celebrate!");
How to make a self aware robot: while (∞) cout<<(sqrt(-∞)/-0);
Previously FRC 451 (The Cat Attack)
Now part of the class of 2016 at WPI & helping on WPILib
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple Definitions bronxbomber92 Programming 4 08-02-2008 17:03
Error - symbol 'command_list' has multiple definitions. Moloch Programming 2 17-02-2005 17:32
Error - symbol 'e' has multiple definitions. HELLPPPPP BookerT Programming 2 24-01-2005 21:50
Need for some official DEFINITIONS dhitchco Rules/Strategy 4 17-01-2005 15:59


All times are GMT -5. The time now is 18:14.

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