This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
Ant can be used to do C++ builds, but make is much more common (and older). On the Microsoft platform, you may find it named "nmake" or "nmk" and the exact characteristics of the makefile have been known to change significantly between Visual Studio releases.
Which is why I finally threw up my hands in despair at doing things in Windows/MS C++. There are few things I like less than having to do an emergency one-line fix to software only to discover that it won't compile anymore because the API libraries were replaced by something completely different and the makefile is the wrong format.
Customer surveys are for companies who didn't pay proper attention to begin with.
Joined: Jul 25, 2008
I use VC++ 6 to build my apps. What im looking for is something that will let me automatically build on a unix/linux machine, which i can then use with a CI tool like Bamboo
Will make be sufficient? I tried cmake on Windows but came across many issues.
Plain old GNU make is awesome; I still use it for Java on several projects. Beats the pants off Ant, frankly, if you only need to build on UNIX. If you need to build on Windows, you can use cygwin, and then using make takes only a small amount of additional effort. Either way it's still loads easier and more flexible than Ant. Seriously.
CMake is, like Ant, an attempt to improve on make that IMO isn't as good as the original. But make honestly doesn't need improving (unless you really, truly insist that your developers have to work on Windows.)
The biggest issue when cross-compiling is to first make sure that the code is compatible. If you you're using the Microsoft Frustration Classes or other Windows-specific include files and libraries, you're in for trouble. If you wrote for vanilla Unix/ANSI C/C++ you should be pretty much OK. There are some portable UI packages that allow you to write GUI code that can be made to run on both Windows and Linux.
The CMake files generated by Visual Studio are basically dumps of the Visual Studio compiler environment. As I recall, they can be rather muddy compared to creating a makefile from scratch.
Unlike Ernest, my enthusiasm for Make versus Ant is a little more tempered. I'd been using make heavily for a LONG time before I discovered Ant, but once I made friends with Ant, I gave up using Make for Java builds. Ant is easier to work with on Java projects, and the builds are easy to make OS-independent. Make is a little less abstract on some things, and as a result, it requires a little more work to make makefiles OS-independent. Also, since Ant's core tasks are Java-savvy, they make it easier to deal with some of the complex directory structures that you get in Java. However, Ant is more cumbersome than Make for C code.