Wednesday, 2 September 2020

Flock, Day 3

A few years ago, I decided to leave the apple ecosystem behind, me at home at least. I found the hardware for the spec was overpriced, and my dual booted window on my macbook pro, started up substantially faster. I spent less and less time in macosx and more and more time in windows 7 and then 10. In my mind windows 10 just runs better. Under the hood its messy, although to be fair to a lesser extent so is macosx. But you can get linux subsystems etc running on it, so now I have 3 shells to content with. Anyway to cut a long story short, I have a laptop with windows on it, I use it to game, surf the net and cut code. I am used to cutting code in modern languages, ones with good package managers, that doesn't require OS or hardware specific flags, or complicated tool chains. I don't want to dual boot linux, or have a second laptop. So I am a touch lost at sea. If you are reading this and fancy giving pointers comment away.

So fighting with visual studio to work with LLVM has not been pleasant. I imagine this is more the laxidaisical support of LLVM than microsoft, as they do seem to attempt to support their tools. 

In the process of mucking around I came across vcpkg this helpful little utility, is a bit like maven or npm or cargo, but for c++, and surprisingly multiplatform support, yay. I made the mistake of downloading the latest tag version, if you are foolishly following in my footsteps, go with the master, at time of writing the tag version failed to compile the llvm dependency. So you download this little app, run a batch script and then with a few simple instructions (all documented on that link), you can build projects with llvm as a dependency. Its great even if it takes almost 2 hours to download, compile and then install it. 

vcpkg install llvm

To test that things are working correctly, I have been taking the llvm tutorial, chapter by chapter and running them in new standalone projects. 4 days ago I was struggling to get chapter 2 to build, chapter 3 was even more of a nightmare. I have got all the way to chapter 8 building happily. Chapter 9 builds but doesn't play nicely, and gets upset about memory assignments. However Chapter 9 is Just In Time compilation, something which I will want, but not for  looong time, hopefully my c++ chops would of improved. Whenever I have programmed in c++ in the past, it has  been for mobile development in xcode, or writing java bindings. I feel for engineers that have to build multiplatform applications in c++, it is painful, I am also not a fan of visual studio, its clunky.


No comments:

Post a Comment

Flock Day 8

 It's been a very long time since I last posted, although I have been spending on average 2-3 hours a day cutting code since the last po...