cpp/example_cpp_implicit_link_1/example_cpp_implicit_link_1.cpp

Demonstrates the use of Pantheios with implicit linking in a C++ program.

00001 /* /////////////////////////////////////////////////////////////////////////////
00002  * File:        examples/cpp/example_cpp_implicit_link_1/example_cpp_implicit_link_1.cpp
00003  *
00004  * Purpose:     C++ example program for Pantheios. Demonstrates:
00005  *
00006  *                - use of implicit linking to bind in front-end and back-end
00007  *
00008  * Created:     31st August 2006
00009  * Updated:     31st August 2006
00010  *
00011  * www:         http://www.pantheios.org/
00012  *
00013  * License:     This source code is placed into the public domain 2006
00014  *              by Synesis Software Pty Ltd. There are no restrictions
00015  *              whatsoever to your use of the software.
00016  *
00017  *              This software is provided "as is", and any warranties,
00018  *              express or implied, of any kind and for any purpose, are
00019  *              disclaimed.
00020  *
00021  * ////////////////////////////////////////////////////////////////////////// */
00022 
00023 
00024 /* Pantheios Header Files */
00025 #include <pantheios/pantheios.hpp>              // Pantheios C++ main header
00026 #include <pantheios/implicit_link/core.h>       // Implicitly link the core
00027 #include <pantheios/implicit_link/fe.simple.h>  // Implicitly link the stock front-end fe.simple
00028 #include <pantheios/implicit_link/be.fprintf.h> // Implicitly link the stock back-end be.fprintf
00029 
00030 /* Standard C/C++ Header Files */
00031 #include <string>                               // for std::string
00032 #include <stdlib.h>                             // for exit codes
00033 
00034 /* ////////////////////////////////////////////////////////////////////////// */
00035 
00036 // Define the fe.simple process identity, so that it links when using fe.simple
00037 PANTHEIOS_EXTERN_C const char   FE_SIMPLE_PROCESS_IDENTITY[]    =   "example_cpp_implicit_link_1";
00038 
00039 /* ////////////////////////////////////////////////////////////////////////// */
00040 
00041 int main()
00042 {
00043   pantheios::log_INFORMATIONAL("Hello!");
00044 
00045   return EXIT_FAILURE;
00046 }
00047 
00048 /* ////////////////////////////////////////////////////////////////////////// */

pantheios Library documentation © Matthew Wilson, 2006 SourceForge.net Logo