0

I'm setting up a development environment on my Windows PC so I have more places to work on a project. I have installed VS Build Tools 2019 on my system along with CMake v3.15.3, GnuWin32 Make v3.81, and LLVM CLang v8.0.1.

All official documentation on Magick++ only shows how to compile using Visual Studio proper, Cygwin, or MinGW. Does anyone know how to compile it without any of those? Space on my SSD is tight, and I would rather not install something to never touch again.

I'm thinking of maybe using Ninja to build it since that comes with VS Build Tools. Someone suggested using Make, but isn't used to compile stuff for Linux systems?


EDIT: ImageMagick doesn't come with a CMakeLists.txt file to my knowledge.

I've also heard about msbuild.exe.

dan9er
  • 369
  • 2
  • 17

1 Answers1

0

It looks like you have everything you need to compile the program. Assuming that when you installed the build tools, you installed the C++ stuff. You could probably save some space by uninstalling LLVM unless you really want to compile with clang++. LLVM Windows relies on the Build Tools libraries, and I've never messed around with it enough to get it working well; I work on a Mac or Linux. I did find this guide from LLVM, though. Looks like Visual Studio is required, so you might be better served just uninstalling it.

If space is a concern (you don't say how much free space you actually have), MinGW or Cygwin are much smaller than the MS C++ Build Tools.

Ninja is not a compiler; it is similar to make in that it can be used to automate compilation and linking of your program, but both of those tools do so by taking advantage of a compiler/linker and C++ libraries. make is also available for Windows through MinGW or Cygwin.

cmake is an extra level of abstraction above ninja/make, in that it can create ninja.build or makefiles for you based on the tooling you have installed on your system. cmake really makes the compilation process a lot easier. cmake will choose ninja by default if it is present. The project will come with at least one CMakeLists.txt file if you are able to use cmake.

It's been awhile since I've used MinGW or Cygwin (one or the other, you don't need both), but when I dabbled with something similar (MSYS2), it only took a bit under 700 MB if all you want is to work with C++.

sweenish
  • 4,793
  • 3
  • 12
  • 23
  • I didn't ask for an explanation of Ninja, Make, or CMake. I know what those are. If submitting an answer, please make sure it actually addresses the question. – dan9er Oct 02 '19 at 21:45
  • So what are you asking? Going by the headline, you're asking the equivalent of "How do I compile x without a compiler?" That doesn't imply a lot of knowledge of what ninja/make/cmake/cygwin/mingw/LLVM actually is. – sweenish Oct 03 '19 at 14:56
  • It also makes me think you should just download a binary instead. It's available officially in every format you might want. You could also use a package manager like chocolatey if you want to keep it up to date semi-automatically. You downloaded stuff to compile LLVM, at no point does the the imagemagick guide require LLVM. LLVM also requires Visual Studio, so what's your endgame here? So, to toss the ball back in your court, if asking a question, make sure your requirements are clear. – sweenish Oct 03 '19 at 14:58
  • First, I've already installed LLVM via installer. Where did you get that I'm trying to *compile* LLVM? And second, I'm talking about Magick++ (https://imagemagick.org/www/script/magick++.php), not ImageMagick the CLI. According to the linked page, the only way to get Magick++ is via building unless I'm mistaken. Third, I do now realize some of the stuff I installed is unnecessary. – dan9er Oct 04 '19 at 01:53
  • And fourth, VS Build Tools is everything VS proper comes with *except* the editor itself. It's ment for people who want to compile for Windows but want to use an alternative editor. BTW the VS editor uses `msbuild.exe` in the background to build solutions, so... – dan9er Oct 04 '19 at 02:09
  • So clearly you don't need any help; you've got it all figured out. – sweenish Oct 04 '19 at 15:30