View Single Post
  #27   Spotlight this post!  
Unread 27-11-2007, 04:36
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 592
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 and Eclipse

Quote:
Originally Posted by sumadin View Post
Implink "..\18F8722.lkr" /a INHX32 /w /m FRCMapfile.map /o"2k6.hex" ./controls.o ./main.o ./motors.o /l"C:\mcc18\lib" ..\FRC2k6_library.lib ..\WPILib2k6.lib
MPLINK 3.90, Linker
Copyright (c) 2004 Microchip Technology Inc.
Error - symbol 'Set_Number_of_Analog_Channels' has multiple definitions.
Errors : 1
This error is caused by linking with WPILib2k6.lib and FRC2k6_library.lib in the wrong order. You can change that by going to the project settings window. Once there, select C/C++ Build, then select Settings. Under the "Tool Settings" tab, you select "MPLINK Linker" then "Linker Information". Scroll down to "Libraries included in Linking". There you can select one of the two libraries and using the up/down arrow buttons reorder them. The idea is to have the WPILib library first in the list.

The reason this happens is that there is some code in WPILib that duplicates part of the A/D code in the IFI library. If the IFI library is linked first, then both sections of code get included in the .hex file - and you see the multiple definition error.

Brad
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute