Go to Post Play FRC like Bruce Lee, not an MMA fighter. - Jessica Boucher [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 10-01-2016, 16:20
1452-Leo 1452-Leo is offline
Registered User
FRC #1452 (Omnicats)
Team Role: Alumni
 
Join Date: Dec 2014
Rookie Year: 2014
Location: Los Angeles
Posts: 44
1452-Leo is an unknown quantity at this point
WPIlib not being included in new projects

I just finished setting up Eclipse with the FRC C++ plugin on my Mac and for some reason, WPIlib is not being included in new projects. Also, the "Add Include" option is greyed out. I can open a new sample robot project, but it is filled with errors on almost every line. Does anyone know how to fix this? Thanks!
  #2   Spotlight this post!  
Unread 11-01-2016, 08:56
euhlmann's Avatar
euhlmann euhlmann is offline
CTO, Programmer
AKA: Erik Uhlmann
FRC #2877 (LigerBots)
Team Role: Leadership
 
Join Date: Dec 2015
Rookie Year: 2015
Location: United States
Posts: 395
euhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud of
Re: WPIlib not being included in new projects

When you create projects through File > New > Wpilib > robot C++ project it should be adding the includes automatically. Check on the "paths and symbols" section if your project build settings, there should be a wpilib location listed under include paths. If there isn't, try setting up a new project with File > New > Wpilib > robot C++ project.

If the include path is listed but you still have errors, make sure you have correctly used the #include directive in your code. Also, you can try rebuilding your C++ index by right clicking your project > index > rebuild.
  #3   Spotlight this post!  
Unread 11-01-2016, 21:25
1452-Leo 1452-Leo is offline
Registered User
FRC #1452 (Omnicats)
Team Role: Alumni
 
Join Date: Dec 2014
Rookie Year: 2014
Location: Los Angeles
Posts: 44
1452-Leo is an unknown quantity at this point
Re: WPIlib not being included in new projects

Quote:
Originally Posted by euhlmann View Post
When you create projects through File > New > Wpilib > robot C++ project it should be adding the includes automatically. Check on the "paths and symbols" section if your project build settings, there should be a wpilib location listed under include paths. If there isn't, try setting up a new project with File > New > Wpilib > robot C++ project.

If the include path is listed but you still have errors, make sure you have correctly used the #include directive in your code. Also, you can try rebuilding your C++ index by right clicking your project > index > rebuild.
All the projects I create through WPILib don't have the includes, but they all have:
Code:
#include "WPILib.h"
at the top of the Robot.cpp. Also, rebuilding the index doesn't seem to fix it.

In Paths and Symbols > Includes > GNU C++, I have "${WPILIB}/cpp/current/include" and "/${ProjName}/src". The libraries tab just as an entry called "wpi" and the Library Paths tab just has "${WPILIB}/cpp/current/lib" again. Are my settings wrong here or could something else be the problem?

Thanks for all the help!
  #4   Spotlight this post!  
Unread 12-01-2016, 01:10
1452-Leo 1452-Leo is offline
Registered User
FRC #1452 (Omnicats)
Team Role: Alumni
 
Join Date: Dec 2014
Rookie Year: 2014
Location: Los Angeles
Posts: 44
1452-Leo is an unknown quantity at this point
Re: WPIlib not being included in new projects

Just update my Eclipse to Mars, reinstalled all the plugins, and reinstalled the toolchain. The FRC libraries are now being included (yay!) but there are still some other issues. It's giving me some basic C++ errors like "fatal error: iostream: no such file or directory" and not recognizing anything from the standard library. I have rebuild the index and everything from Paths and Symbols looks the same as before. Any ideas? Thanks!
  #5   Spotlight this post!  
Unread 12-01-2016, 10:54
fsilberberg fsilberberg is offline
WPILib Developer
AKA: Fred Silberberg
FRC #0190
Team Role: Alumni
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Redmond
Posts: 148
fsilberberg has a spectacular aura aboutfsilberberg has a spectacular aura aboutfsilberberg has a spectacular aura about
Re: WPIlib not being included in new projects

If you right click the project, click Properties, expand C/C++ Build, hit Settings, then on the right side Tool Settings -> Cross Settings, there will be a Path element. Make sure that it's pointing at the correct location for your machine: if it's not, update it to point at the bin directory of the installed toolchains.
  #6   Spotlight this post!  
Unread 12-01-2016, 12:30
1452-Leo 1452-Leo is offline
Registered User
FRC #1452 (Omnicats)
Team Role: Alumni
 
Join Date: Dec 2014
Rookie Year: 2014
Location: Los Angeles
Posts: 44
1452-Leo is an unknown quantity at this point
Re: WPIlib not being included in new projects

Quote:
Originally Posted by fsilberberg View Post
If you right click the project, click Properties, expand C/C++ Build, hit Settings, then on the right side Tool Settings -> Cross Settings, there will be a Path element. Make sure that it's pointing at the correct location for your machine: if it's not, update it to point at the bin directory of the installed toolchains.
It's pointing to "/usr/local/bin" which should be the correct folder, but I still tried "/usr/bin" and "/usr/local/arm-frc-linux-gnueabi/bin" just in case, and they both didn't work. Is there anything else it could be?
  #7   Spotlight this post!  
Unread 12-01-2016, 14:09
fsilberberg fsilberberg is offline
WPILib Developer
AKA: Fred Silberberg
FRC #0190
Team Role: Alumni
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Redmond
Posts: 148
fsilberberg has a spectacular aura aboutfsilberberg has a spectacular aura aboutfsilberberg has a spectacular aura about
Re: WPIlib not being included in new projects

It should be the path that you see when you run a
Code:
which arm-frc-linux-gnueabi-g++
minus the actual executable at the end.
  #8   Spotlight this post!  
Unread 12-01-2016, 21:19
1452-Leo 1452-Leo is offline
Registered User
FRC #1452 (Omnicats)
Team Role: Alumni
 
Join Date: Dec 2014
Rookie Year: 2014
Location: Los Angeles
Posts: 44
1452-Leo is an unknown quantity at this point
Re: WPIlib not being included in new projects

Quote:
Originally Posted by fsilberberg View Post
It should be the path that you see when you run a
Code:
which arm-frc-linux-gnueabi-g++
minus the actual executable at the end.
It returned "/usr/local/bin/arm-frc-linux-gnueabi-g++", and I already had it in "/usr/local/bin" so I didn't end up changing anything. Here is what the console returns when I try to compile the starting code:
Code:
18:19:40 **** Incremental Build of configuration Debug for project 1452-Omnicats-2016 ****
Info: Internal Builder is used for build
arm-frc-linux-gnueabi-g++ -std=c++1y -I/Users/****/wpilib/cpp/current/include "-I/Users/****/FRC 2016/1452-Omnicats-2016/src" -O0 -g3 -Wall -c -fmessage-length=0 -o src/Robot.o ../src/Robot.cpp 
In file included from ../src/Robot.cpp:1:0:
/Users/****/wpilib/cpp/current/include/WPILib.h:13:20: fatal error: iostream: No such file or directory
 #include <iostream>
Thanks!
  #9   Spotlight this post!  
Unread 20-01-2016, 17:00
kylelanman's Avatar
kylelanman kylelanman is offline
Programming Mentor
AKA: Kyle
FRC #2481 (Roboteers)
Team Role: Mentor
 
Join Date: Feb 2008
Rookie Year: 2007
Location: Tremont Il
Posts: 191
kylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to all
Re: WPIlib not being included in new projects

Quote:
Originally Posted by 1452-Leo View Post
Code:
18:19:40 **** Incremental Build of configuration Debug for project 1452-Omnicats-2016 ****
Info: Internal Builder is used for build
arm-frc-linux-gnueabi-g++ -std=c++1y -I/Users/****/wpilib/cpp/current/include "-I/Users/****/FRC 2016/1452-Omnicats-2016/src" -O0 -g3 -Wall -c -fmessage-length=0 -o src/Robot.o ../src/Robot.cpp 
In file included from ../src/Robot.cpp:1:0:
/Users/****/wpilib/cpp/current/include/WPILib.h:13:20: fatal error: iostream: No such file or directory
 #include <iostream>
Same problem. Did anyone ever figure this out?
__________________
"May the coms be with you"

Is this a "programming error" or a "programmer error"?

  #10   Spotlight this post!  
Unread 22-01-2016, 12:27
1452-Leo 1452-Leo is offline
Registered User
FRC #1452 (Omnicats)
Team Role: Alumni
 
Join Date: Dec 2014
Rookie Year: 2014
Location: Los Angeles
Posts: 44
1452-Leo is an unknown quantity at this point
Re: WPIlib not being included in new projects

Quote:
Originally Posted by kylelanman View Post
Same problem. Did anyone ever figure this out?
I never figured it out, I just switched to bootcamp and it works there.
Closed Thread


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


All times are GMT -5. The time now is 03:13.

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