Compiling flexc++ from source (in Ubuntu Precise)

Jurjen Bokma

February 2012


As of this writing, flexc++ has been out less than a week. So you may want to try just installing it with the package management system, instead of rushing in an following the steps below.


This section is already outdated. Flexc++ is available from Debian Sid, and the Sid package can be installed in Precise.

Procedure 25.  BobCat
  1. Flexc++ won't compile with the BobCat that comes with Precise. So we fetch its latest version

  2. apprentice@testbox:~$ sudo apt-get install -y icmake libreadline-dev libx11-dev libssl-dev

  3. tar zxf bobcat_2.21.01.orig.tar.gz
    cd bobcat-2.21.01

  4. The file contains the install path /usr. Change it to /usr/local like this:

    void setLocations()
    BASE  = "/usr/local";

  5. apprentice@testbox:~$ ./build libraries
    The class FBB::Xpointer can only be compiled if you have installed
    the file X11/Xlib.h. To use the class Xpointer, programs using Xpointer
    objects must also be linked against the X11 library: -lX11 -lbobcat

    The class FBB::Xpointer can safely be left out of the bobcat library if
    you're not planning to construct programs using Xpointer.

    Press Enter y if you WANT to compile the files of the class FBB::Xpointer.
    Press Enter or any other line if you DON'T WANT to include the class
                                  FBB::Xpointer in the bobcat library.
    The SSL classes can only be compiled if you have installed
    the libssl-dev development library, containing files like
    /usr/include/openssl/bn.h. To use objects from openssl programs
     must also be linked against the openSSL library: -lssl -lbobcat

    The SSL classes can safely be left out of the bobcat library if
    you're not planning to construct programs using them.

    Press Enter y if you WANT to compile the files of the SSL classes
    Press Enter or any other line if you DON'T WANT to include the SSL classes
                                  in the bobcat library.
    The classes using the readline library can only be compiled if you
    have installed the libreadline-dev development library, containing
    files like /usr/include/readline.h. To use objects of these
    classes in your programs, your programs must also be linked
    against the readline library: -lreadline -lbobcat

    The classes depending on the readline library can safely be left
    out of the bobcat library if you're not planning to construct
    programs using them.

    Press Enter y if you WANT to compile the classes using the
    readline library
    Press Enter or any other line if you DON'T WANT to include these     classes in the bobcat library.
    The class FBB::Milter can only be compiled if you have installed
    the file libmilter/mfapi.h. To use the class Milter, programs using
    Milter objects must also be linked against the milter library:
    -lmilter -lbobcat

    The class FBB::Milter can safely be left out of the bobcat library if
    you're not planning to construct mail filters using FBB::Milter.

    Press Enter y if you WANT to compile the files of the class FBB::Milter.
    Press Enter or any other line if you DON'T WANT to include the class
                                  FBB::Milter in the bobcat library.

  6. apprentice@testbox:~$ sudo ./build install

Procedure 26.  Flexc++
  1. apprentice@testbox:~$ wget
    apprentice@testbox:~$ tar zxf flexc++_0.09.51.tar.gz
    apprentice@testbox:~$ cd flexc++-0.09.51

  2. Make it install in /usr/local by setting that path in

    void setLocations()
    BASE  = "/usr/local"

  3. apprentice@testbox:~$ ./build program

  4. apprentice@testbox:~$ sudo ./build install