Thursday, August 10, 2017

FFTW and IT++ with Eclipse And Command Line


Installation of FFTW:
  1. Download the latest FFTW package from http://www.fftw.org/.
  2. Unzip and install FFTW:
    1. cd ~/Downloads/fftw-3.3.5
    2. ./configure
    3. make && make install
  3. Verify that libfftw3.a and libfftw3.la are present in the path /usr/local/lib
Installation of IT++:
  1. Download the latest IT++ package from http://itpp.sourceforge.net/4.3.1/installation.html.
  2. Unzip and go inside the folder : cd ~/Downloads/itpp-4.3.1
  3. Create a build directory : mkdir build && cd build/
  4. Open cmake GUI. If cmake not present , visit https://cmake.org/download/
  5. In cmake, add the following entries:
    1. Where is the source code: ~/Downloads/itpp-4.3.1
    2. Where to build the binaries:~/Downloads/itpp-4.3.1/build
  6. Click Configure -> Use default native compilers -> Done
  7. Click Generate
  8. Return back to terminal. Run make && make install to build & install. [Locate the shared library at /usr/local/lib/]
NOTE: Install FFTW (or any other dependent packages) before IT++

Linking IT++ in Eclipse:
  1. Install the latest Eclipse CDT from https://eclipse.org/cdt/.
  2. Add the shared library of itpp in the path:
    1. Project -> Properties -> C/C++ General -> Paths and Symbols -> Libraries -> Add -> enter 'itpp' -> OK
  3. Write (or get it from BitBucket) C++ code which uses IT++ functions. Then
    1. Build Project
    2. Run As -> Local C/C++ Application
  4. If the following error "Launch failed. Binary not found." is encountered, then fix it by: Project -> Properties -> C/C++ Build -> Settings -> Binary Parsers -> check Mach-O 64 Parser

Linking IT++ in Command Line:
  1. PATH=$PATH:/usr/local/include/:/usr/local/lib/
  2. g++ -o <output> <filename>.cc -litpp
  3. ./<output>

No comments:

Post a Comment