Go to Post Action x (Passion Vision) = Goal - EricH [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

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 02-04-2016, 12:11
JohnM's Avatar
JohnM JohnM is offline
Registered User
FRC #5854 (Glitch)
Team Role: Programmer
 
Join Date: Mar 2014
Rookie Year: 2013
Location: North Carolina
Posts: 53
JohnM has a spectacular aura aboutJohnM has a spectacular aura about
Building ntcore with mingw

So I haven't heard a response in this thread in a couple days now so I wanted to create a new thread.

My issue is that I can't build the ntcore library so I can use it on a Windows system using mingw + cmake. I keep on getting these errors whenever I try to build with

mingw32-make

I know I could try the visual studio compiler, but I need it to be built with mingw for 32 bit.

Another possibility is I could try to use UDP or TCP sockets. I much rather use network tables though.
Reply With Quote
  #2   Spotlight this post!  
Unread 02-04-2016, 21:41
fsilberberg fsilberberg is offline
WPILib Developer
AKA: Fred Silberberg
FRC #0190
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Mendon
Posts: 143
fsilberberg has a spectacular aura aboutfsilberberg has a spectacular aura aboutfsilberberg has a spectacular aura about
I'm currently on my phone, and your Google docs isn't opening. However, MinGW is not one of our supported platforms. We have precompiled versions available though. Look in either the c++ or java folders here http://first.wpi.edu/FRC/roborio/mav...networktables/. You want the - desktop classifiers for either the c++ or java. For c++, extract the binaries from the zip and grab the Windows one for your architecture. For Java, the provided jar will run on Mac, Windows, and Linux.
Reply With Quote
  #3   Spotlight this post!  
Unread 02-04-2016, 21:43
JohnM's Avatar
JohnM JohnM is offline
Registered User
FRC #5854 (Glitch)
Team Role: Programmer
 
Join Date: Mar 2014
Rookie Year: 2013
Location: North Carolina
Posts: 53
JohnM has a spectacular aura aboutJohnM has a spectacular aura about
Re: Building ntcore with mingw

Quote:
Originally Posted by fsilberberg View Post
I'm currently on my phone, and your Google docs isn't opening. However, MinGW is not one of our supported platforms. We have precompiled versions available though. Look in either the c++ or java folders here http://first.wpi.edu/FRC/roborio/mav...networktables/. You want the - desktop classifiers for either the c++ or java. For c++, extract the binaries from the zip and grab the Windows one for your architecture. For Java, the provided jar will run on Mac, Windows, and Linux.
Will try out. Sorry about it not opening. The reason is because it is a text file.
Reply With Quote
  #4   Spotlight this post!  
Unread 03-04-2016, 00:40
virtuald's Avatar
virtuald virtuald is offline
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,032
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: Building ntcore with mingw

Quote:
Originally Posted by JohnM View Post
Will try out. Sorry about it not opening. The reason is because it is a text file.
Next time use gist or pastebin.

Also, I can't read it either on my desktop, it wants me to download a 0-byte file. :-/
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
Reply With Quote
  #5   Spotlight this post!  
Unread 03-04-2016, 22:00
JohnM's Avatar
JohnM JohnM is offline
Registered User
FRC #5854 (Glitch)
Team Role: Programmer
 
Join Date: Mar 2014
Rookie Year: 2013
Location: North Carolina
Posts: 53
JohnM has a spectacular aura aboutJohnM has a spectacular aura about
Re: Building ntcore with mingw

I decided to drop ntcore and just try to use a TCP socket. I want the robot to be the server and the ds to be the client. I'm using the winsock library on the Windows ds and my question was if this and this could be used for setting up a TCP socket stream with the DS. Or will I have to use regular linux socket calls. Is there any C++ examples using the WPILIB version? Also a concern of my is when I'm using the receive function will it stall the code until the server receives something?
Reply With Quote
  #6   Spotlight this post!  
Unread 03-04-2016, 23:03
Peter Johnson Peter Johnson is offline
WPILib Developer
FRC #0294 (Beach Cities Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Redondo Beach, CA
Posts: 243
Peter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud of
Re: Building ntcore with mingw

Quote:
Originally Posted by JohnM View Post
I decided to drop ntcore and just try to use a TCP socket. I want the robot to be the server and the ds to be the client. I'm using the winsock library on the Windows ds and my question was if this and this could be used for setting up a TCP socket stream with the DS. Or will I have to use regular linux socket calls. Is there any C++ examples using the WPILIB version? Also a concern of my is when I'm using the receive function will it stall the code until the server receives something?
The issue you're running into with mingw32 is likely lack of support in mingw for std::mutex. See https://github.com/meganz/mingw-std-threads for a possible solution (however, it will require editing a number of the ntcore source files). Alternatively if you can use mingw64, which may have the necessary support built in.

If you're rolling your own, the two classes you're referencing are actually part of ntcore, and while they're present in the library and docs, headers aren't installed for them at present (you can however copy the necessary headers from the ntcore source), and as they were actually intended for ntcore-internal usage, there's no examples. These two classes are pretty basic wrappers around Linux socket calls. Yes, accept() and receive() are blocking calls (although you can specify a timeout for receive to make it semi-non-blocking), so you should put them in a separate thread.
__________________
Author of ntcore - WPILib NetworkTables for 2016+
Creator of RobotPy - Python for FRC

2010 FRC World Champions (294, 67, 177)
2007 FTC World Champions (30, 74, 23)
2001 FRC National Champions (71, 294, 125, 365, 279)
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


All times are GMT -5. The time now is 09:35.

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