Create your own library, like WPILib?

I am writing a library, which contains all the stuff my team needs but isn’t in WPILib, like integer mapping, threaded timers, and inverse kinematics for mecanum wheel drive. I would like to include it in the standard include directory, so i can simply do an

#include <MRTLib.h>

at the top of my C++ program and get my library. How do i do this?

I have already created a header and cpp file, which work already.

Might i have forgotten to mention that i am using Windriver C++?

I’d imagine it would be fairly simple to implement. Excellent idea by the way! We may try and accomplish the same thing.

Just copy the format of the WPILib. You would probably have to import all the files into every project you start, easiest way to do that I’d imagine would just have a folder titled MRTLib, and inside a file MRTLib.h, MRTLib.cpp, and all the other things you’d want to create. Just follow the format of the WPILib :smiley: they did pretty well on it!

EDIT: on second thought, you could just add the classes you want into the WPILib! put the files in the WPILib location and add the include into the main WPILib.h file. would make your life a whole lot easier, although you’d have to re-import the classes every year.

Note: Be careful about R13 (elements created before Kickoff) if you intend to reuse libraries from year to year. There is an exception for “publicly available prior to Kickoff”. A post here with a link to your library should be sufficient for “publicly available”.

psst… I can help you :wink: All of my examples have been restricted to methods instead of separate classes and OOP because the vast majority of what I have been trying to teach you guys can be easily contained in a single file. I’ll try to put up some examples when I get a chance…