How to Build

There are two main ways to build the projects:

1. Using Qmake

Follow these directions to build projects using the qmake/make build tools.

For building using a graphical IDE, see 2. Using QtCreator.

Once the BitFlow SDK and driver are built and operating, and the BFT4Lin package has been downloaded and unarchived in an accessible location on the local user drive, a build may be made directly.

Whichever project is to be built, these same steps should be followed:

  1. Open the terminal application of your choice.

  2. Ensure that the BITFLOW_INSTALL_DIRS environment variable is set to reference the include and library paths of the BitFlow SDK. This may either be in the form of semicolon separated paths, such as

    $ export BITFLOW_INSTALL_DIRS=/usr/local/inc;/usr/local/lib
    

    or the top-level path to the untarred BitFlow Linux driver package, containing the sub-directories “./[32b|64b]/lib/” and “./inc/”

    $ export BITFLOW_INSTALL_DIRS=/path/to/BitFlow/Linux/driver/package
    

    In either case, the BFciLib.h and libBFciLib.a header and library files must be present in the referenced directories.

    Alternatively, the include and library paths may be set explicitly using the BITFLOW_INC_PATH and BITFLOW_LIB_PATH variables.

  1. Navigate to the top level BFT4Lin directory, where the PRO files are stored.

    $ cd /path/to/BFT4Lin
    
  2. Use qmake to generate Makefiles for the project to be built.

    $ qmake -qt5 -r ./BFT4Lin_<project>.pro
    
  3. Run make to build the project.

    $ make
    
  4. (Optional) Some components of BFT4Lin may be installed to the local system using make.

    $ sudo make install
    

    Uninstall is also available.

    $ sudo make uninstall
    

    Default install paths are:

    • Ximilon: /usr/local/bin/

    • BitFlow Preview: /usr/local/bin/

    • BitFlow Capture: /usr/local/bin/

    • CamML: /usr/local/bin/

    • BFLog: /usr/local/bin/

    • BFLogCollector: /usr/local/bin/

    • ImageView: /usr/local/lib/BitFlow/

    • BFGTL: /usr/local/lib/BitFlow/

    • BFGTLUtil: /usr/local/lib/BitFlow/

    • Gen<i>Cam GenApi: /usr/local/lib/BitFlow/GenICam/

    • Ximilon User’s Guide: /usr/local/share/BitFlow/Ximilon/

    • Gen<i>Cam Licensing: /usr/local/share/BitFlow/GenICam/

BitFlow Preview, BitFlow Capture, CamML, BFLog, BFLogCollector, CViewSimple and CppViewSimple may be run directly from their containing directories. If installed, BitFlow Preview, BitFlow Capture, CamML, BFLog and BFLogCollector may be run from any command prompt.

GenTLInterfaceExample may be run directly from its containing directory, given that the GENICAM_ROOT_V3_3, GENICAM_CACHE_V3_3 and GENICAM_GENTL[32|64]_PATH variables have first been set, as described in Third Party Components.

Because ImageView is dynamically linked, before Ximilon, BitFlow Preview, BitFlow Capture or CamML can be run, ImageView must either be installed to the default install location (see step 6), or be added to the load path by a different method. Various methods exist to add directories to the load path, including adding a .conf file to /etc/ld.so.conf.d, adding the ImageView binary directory to LD_LIBRARY_PATH, or using the ldconfig tool.

For more information on ldconfig, see: http://manpages.ubuntu.com/manpages/disco/man8/ldconfig.8.html

2. Using QtCreator

Follow these directions to build projects using the QtCreator IDE.

For command line build instructions, see 1. Using Qmake.

Once the BitFlow SDK and driver are built and operating, and the BFT4Lin package has been downloaded and unarchived in an accessible location on the user hard drive, a build may be made directly.

Whichever project is to be built, these same steps should be followed:

  1. Open QtCreator

  2. Load the desired project by selecting File > Open File or Project… and opening the desired PRO file. Complete any prompts upon open

  3. Switch QtCreator to the Projects mode, and select the correct project tab

  4. Expand the Build Environment Details pane, and add path variables to the BitFlow SDK library and header files. The BITFLOW_INSTALL_DIRS variable may be set to reference both the include and library paths of the BitFlow SDK in the form of semicolon separated paths, such as

    $ BITFLOW_INSTALL_DIRS=/usr/local/inc;/usr/local/lib
    

    or to the top-level path to the untarred BitFlow Linux driver package, containing the sub-directories “./[32b|64b]/lib/” and “./inc/”

    $ BITFLOW_INSTALL_DIRS=/path/to/BitFlow/Linux/driver/package
    

    In either case, the BFciLib.h and libBFciLib.a header and library files must be present in the referenced directories.

    Alternatively, the include and library paths may be set explicitly using the BITFLOW_INC_PATH and BITFLOW_LIB_PATH variables.

    Variables must be set for all desired build configurations (Release, Debug, etc.)

  5. (Optional) In the General settings pane, select the desired Build directory for each configuration.

  6. Switch QtCreator to the Edit mode

  7. Use the Kit Selector to select the desired project and build configuration

  8. Click the Build button to build the project

After a successful build, the projects for BitFlow Preview, BitFlow Capture, CamML, CViewSimple, CppViewSimple, BFLog and BFLogCollector may be run directly within QtCreator with or without the debugger. Some packages may be partially rebuilt each time the application is run within QtCreator; this behavior is expected.

GenTLInterfaceExample may be run directly within QtCreator, given that the GENICAM_ROOT_V3_3, GENICAM_CACHE_V3_3 and GENICAM_GENTL[32|64]_PATH variables have first been set, as described in the Gen<i>Cam THIRD PARTY COMPONENTS sub- section.

Because ImageView is dynamically linked, it must either be installed to the default install location (see step 6 of QMAKE BUILD), or be added to the load path by a different method. Various methods exist to add directories to the load path, including adding a .conf file to /etc/ld.so.conf.d, adding the ImageView binary directory to LD_LIBRARY_PATH, or using the ldconfig tool. For more information, see: