View Single Post
  #2   Spotlight this post!  
Unread 15-01-2017, 01:32
Thomas DeSilva's Avatar
Thomas DeSilva Thomas DeSilva is offline
Programming Fury
FRC #1983 (Skunkworks)
Team Role: Mentor
 
Join Date: Feb 2009
Rookie Year: 2009
Location: Des Moines, WA
Posts: 22
Thomas DeSilva is on a distinguished road
Re: CTRE Toolsuite with Command-Based C++

Could you post the full compiler output from when it fails? You can find this by opening the "Console" window in Eclipse. There are a number of things that can lead to you seeing an undefined reference error that we may see earlier in the output. I notice that your include for CANTalon.h uses quotes instead of angle brackets*, which could do it, but we would also see an error complaining that the included file wasn't found if this was the case.

The linker error you ran into ("c:/frc/bin/../lib/gcc/arm-frc-linux-gnueabi/4.9.3/../../../../arm-frc-linux-gnueabi/bin/ld.exe: cannot find -lTalonSRXLib") seems a little strange. I think the CTRE library in the current version of the toolsuite is called CTRLib, not TalonSRXLib. I may be completely off-base here, but are you using the 2017 version of WPILib, or an older one? Nonetheless, you should make sure that your include paths are set up correctly. In Eclipse, go into your C/C++ build settings for the project and take a look at the "Libraries" subsection for the linker. Is there a file called "libTalonSRXLib.so" or "libTalonSRXLib.a" at any of the paths in the "Library search path" section? If not, you need to find where that file actually exists on your machine and add the path here. If you don't have that file, you should probably change the library to be CTRLib instead of TalonSRXLib and give it the path to that instead.

* Using quotes in an include makes the compiler check the relative path instead of the include path for the file, so it won't work here unless CANTalon.h happens to be at the given location relative to Motor.h, i.e. in the same directory.
__________________
Programmer 2009-2011
Driver 2011
WPI Class of 2015
Reply With Quote