Boost logo

Boost :

Subject: [boost] Boost.Application
From: Renato Tegon Forti (re.tf_at_[hidden])
Date: 2012-01-25 16:57:32

Hi All,

I have the first prototype of the "Boost.Application" ready!

I would like to receive comments so I can refine the library. Please send
your feedback to re.tf_at_[hidden]

0) Introduction

A Boost.Application allows a developer run your application as a Windows
service, as a Unix/Linux daemon, or as a usual interactive application
(terminal) without the need to add extra code, the library abstract OS
specific API and provide a ease common interface.

In case of server application, developer need only compile your code on a
Windows to have a ready to play Windows Service or in a UNIX/Linux to have

CTRL-C signals and SCM (Service Control Manager) controls handlers are
available for terminating, pause/resume(windows) the application
constructively and many other until methods are available in application
class like a single instance running limitation!

1) Download:

2) Installation:

The library is one: Automatic linking

You should unpack the files and copy:


3) Build

Then you must build, for example (in windows):

bjam toolset=msvc-9.0 variant=debug threading=multi link=shared

4) Documentation

The project has an incomplete documentation:


5) Use

however, the tutorial explains how to use the lib, and that generally goes
like this:

#include <boost/application/engine.hpp>

class myapp : public boost::application::application
    int main(const std::vector<std::string>& args)
        // your application logic here!
            std::cout << "Hello Boost.Application!" << std::endl;
            // ...
            if(state() == boost::application::application_stoped)
        return 0;

BOOST_APP(myapp, "MainTutorial1", "Boost.Application Main Tutorial 1!",
                  boost::application::default_application_type, 1, 0, 1)


The folder:


Has all tutorial files!

I tested the lib on Windows VC9 (Windows Service) and Ubuntu 11 GCC 4

6) Questions:

* Is there any interest in this library?
* If Yes! What are the refinements? (see todo, for some)

Please send your feedback to re.tf_at_[hidden]

Thanks to all

Boost list run by bdawes at, gregod at, cpdaniel at, john at