Monday, May 6, 2019

Win Build on Nix

I have completed a functioning version of NMX (Note Matrix - a project I've been building and rebuilding in various languages and platforms for - probably almost 15 years). It is a console-based notes / bookmarks / todo list / contacts etc app. It uses SQLITE for its database and every time an entry is viewed it creates a txt file of that entry, so you can view your data in any text editor (This feature came about in the Java version, so if you have Java issues, or the DB becomes corrupt, or incompatible with future versions of NMX, you can still read your data).

Being a total c++ noob, compiling the Windows binary was a challenge. I setup a virtual Windows box and tried Mingw. I had a hard time getting the SQLITE .dll linked. After a few attempts I decided to go with an IDE to build it. I went with a free lightweight app: Code::Blocks. I got my c++ files loaded into a blank project and linked the SQLITE .dll and it built!

My only concern was that the Windows OS in my virtual box would expire in about a month or so and I would have to rebuild it. So my goal was to be able to rebuild the Windows binary from within Wine.

I downloaded and installed Code::Blocks and Mingw in Wine. I had to get the Ming Gcc/G++ installed then it worked! I had to find and add the .dll versions of the standard libraries. I put these in the same directory as my sources. I tried creating a .bat file to call the same commands that Code::Blocks does when it rebuilds, but this didn't seem to work, so I'm stuck with Code::Blocks, but at least I can run it in Wine instead of a virtual machine.

No comments:

Post a Comment

From Shotcut to Kdenlive

So I've been using Shotcut for a while now, for my YouTube videos... and music videos. I love the application. Slicing clips, doing fade...