View Single Post
  #3   Spotlight this post!  
Unread 18-05-2010, 12:08
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,065
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: DIY Static Library

An interesting thing with our build environment is that since we're compiling as kernel modules, your robot program is actually its own dynamic library (as opposed to a static *.a library).

My development pattern is that I tend to make a lot of little projects to test various things, and setting up linkage to a set of libraries each time would get annoying. So instead of setting up a static library, I compile it as a regular project, and then FTP the object file (*.out) to the robot and edit ni-rt.ini to load the library before it loads FRC_UserProgram.out. Then my installation program for the library copies the header files to the wind river include directory, and I just include the header files and it all magically works.

The other reasoning for this is that my library uses boost, and setting up that is a pain, so I'd rather just have a quick installer that installs the relevant header files and object files on our other development computers instead of trying to do it on each machine.

Of course, if your library changes a lot, then this is a bad approach. Its more suited to something that you are going to redistribute to other teams. See my project website for more information: http://code.google.com/p/webdma/
__________________
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