Skip to content
deepadhurka edited this page Dec 12, 2014 · 23 revisions

####Build Instructions ######Compiling the library

$ make help make objects : build library objects make all : compile and link library make install : install library Needs root permissions make clean : cleans all object files of library make test : compile all tests make runtest : execute all tests Creates xml and html log files make cleantest: cleans all temporary test files including log files

If you want to run the compiled test programs multiple times, either manually invoke gtester for each program, or, run ‘make cleantest’ before every ‘make runtest’.

Compiling an SDN controller or switch using the library

  1. Install the dependency libraries

  2. Compile and install the library object make all make install

The paths to library directory and header file directory are hard-coded. Please modify Makefile to change each path if necessary.

Default location of libccof.so.0 - /usr/local/lib Default location of cc_of_lib.h - /usr/local/include

  1. Include the header file in your code #include “cc_of_lib.h”

  2. Follow instructions for compilation of glib applications: https://developer.gnome.org/glib/stable/glib-compiling.html Set an environment variable with necessary glib flags. For example:

GFLAGS='-I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -lglib-2.0'

Note: the glib flags may vary on each system. Get the exact values from pkg-config output as instructed by Gnome’s manual for glib.

  1. Finally, run GCC gcc your_program.c $GFLAGS -lccof -I/usr/include/lib

|< < Prev Page|Next Page >>| |---------------------------|-------------------------------:|

Clone this wiki locally