Since A lot of doing a lot, I've made some significant progress with my C++ library. It compiles in Windows(Win10) and in Linux(Fedora 29, and WSL but you can't really call that Linux can you? Not according to Richard Stallman!)  and theoretically, it would work fine in Mac too(But I don't have a mac. maybe I'll send it to my dad for him to try).

I decided this time to rather than use Autotools as I did with my C library, I'd embrace CMake this time. 

CMake comes with Visual Studio support and supports creating shared libraries really easily. The major motivator behind this is actually twofold. I want to reuse some of the Math I've learnt while studying 3D programming in Direct X (which is only for Windows). The other part is I'd like to do a better job of stulibc as explained in Kim Kardashians butt and other stuff

Like my Autotools projects, I also have a suite of tests that will run that ensures that the library doesn't regress. The cool thing about this library is that it can be consumed by any C/C++ program as I've got two interfaces to the library. I've put all the C++ code into classes and I've used extern "C" {} code to export specific C functions which behind the scenes call the C++ classes. So this actually means that I can move a lot of my C code from stulibc and put it into  Stulibcpp

I was thinking that I'd probably spend a lot of time on this but I found resources on the net that showed me how it's done and I just improvised the rest. This one resource was about integrating leap motion(I remember the first time I saw one of these was when my colleagues at AppDNA brought one in) with Unity/UnReal.

One thing I did have to tweak was in Unix you can get the address of a function in a shared library with dlsym() like this as shown here:

# define GETFUNC(funchandle, lib, funcName) (*(void**)(&funchandle) = dlsym(lib, funcName))

// and call it like this:

int (*sub)(int, int);

GETFUNC(sub, "stucpp.so", "sub");

sub(10,5)

But this wasn't working for me, it was always complaining about how it cannot implicitly convert a void* to something else. This made sense as you can't do that in C++, though existing code online seemed to be using it. Anyway, to solve the problem I found this online which suggested doing this, which works great: 

int (*sub)(int, int);
reinterpret_cast<void*&>(sub) = dlsym(lib, "sub");
std::cout << sub(10,5) << std::endl;

I also re-used some of the ideas online to write C and C++ specific tests to ensure that the library would be able to be called correctly. For example, I've got a test that calls C-Style GetProcAddress() in windows and one test that merely links to the library and uses a compiled library class.

I'm relatively happy with that progress - now what needs to be done is to finish writing the bulk of the library.

As I explained in Kim Kardashians butt and other stuff, I'd like to do something similar to my C library but this time I'll be adding more Math functions, mostly around vector and matrix manipulations. I'll probably also throw in some Geometry and maybe even some collision detection stuff later one (Diff Calculus) which hopefully will allow me to link this stuff into any new C/C++ app.

Only one more day left of my holiday and this is about as far as I'd wanted to be! 

I think the initial plan will be to slowly port over some of the data structures in my C library or re-implement them with STL and then start putting together some easy file handling interfaces for dealing with saving config files etc as well as saving records to files etc.(in a generic fashion that is). 

I've limited my C++ to ISO 1998 so until I need things like lambdas and auto, I'll leave it as such. 

In other news, I met up with an old AppDNA/Citrix colleague and we compared notes around our existing projects.

One take away was that I should invest in learning google charts and Bootstrap material design for my front-end layout, particularly when it comes to visualizations.

I was actually pleasantly surprised how appealing some of his charts on his front end were. He'd done a great job of quickly developing a .Net MVC/Razor app that calculated financial metrics around companies' financial statements. It's a bit of fresh air really because when I try to develop a nice looking chart like this Running, Coffee, Chocolate and Pizza - it takes forever to be productive...a bit like C/C++!

I'd like to incorporate a few more visualizations in my Angular front end for finance tracker. Anyway, that's another story, which is further down on the list...

Now lets get cracking!

To infinity...and beyond!