Skip to content

Compilation issues #1

@carlesaraguz

Description

@carlesaraguz

Compilation:

  • There's no need to tell the compiler the exact version and file name for the OpenFEC libraries. If they are properly installed, GCC can be called with -lopenfec.
  • There's no need to tell the compiler to look for libraries in the current directory (option -L.), mostly because there are none.
  • It is a very bad idea to inhibit all warning messages (option -w). In fact, I would always recommend to display them all, and to solve them all (option -Wall).

With these changes, your sources would be compiled with:

$ gcc -o TX TX.c radiotap.c -lopenfec -lm -lpcap -lpthread -Wall

Installing OpenFEC:

In order to properly install OpenFEC, the user should issue the following commands:

$ cd <OpenFEC bin Resease/Debug folder>
$ sudo cp libopenfec.so.1.4.2 /usr/lib
$ sudo ln -s /usr/lib/libopenfec.so.1.4.2 /usr/lib/libopenfec.so.1
$ sudo ln -s /usr/lib/libopenfec.so.1 /usr/lib/libopenfec.so
$ sudo ldconfig

Dependencies:

Your sources expect the header files to be in ../openfec.../src/....

simple_client_server.h line 49:

#include "../openfec_v1.4.2/src/lib_common/of_openfec_api.h"

You should document that in your README. However, this is a bit odd. I would suggest to change that so that:

  1. Your header files do _not_ point to ../openfec_v1.4.2/src/lib_common but simply to lib_common.
  2. Your compile.sh uses -I../openfec_v1.4.2/src/lib_common to point the compiler to the exact location of the libraries.

simple_client_server.h line 49 (modified):

#include "of_openfec_api.h"

A different approach would be to copy OpenFEC headers into /usr/include/openfec/ and then use the following include line:

simple_client_server.h line 49 (modified, II):

#include <openfec/lib_common/of_openfec_api.h>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions