• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

C++ Build tool?

 
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, Im using MS C++ to make builds of my C++ code. Is there a tool like maven or ant that can be used with C++ code?

I would eventually like to have this building automatically into a continious integration tool


Thanks

S.
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Make files are pretty common for C++. What do you want your build tool to do that make does not?

As far as continuous integration, I came across an article by Martin Fowler about cruise control and c++
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Santiago Bravo
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

Thanks
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.)
 
Tim Holloway
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
check the documentation for your compiler. If it provides a command line method of compiling and linking
you can use Ant to do your build.
 
Blood pressure normal? What do I change to get "magnificent"? Maybe this tiny ad?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic