Building IT++ itself from source was an easy chore, but I had a brutal, brutal time this afternoon and for most part of the evening trying to negotiate with a linkage error that I was experiencing while trying to get a IT++ based program to run.
IT ++ is a C++ library that implements functions for digital signal processing and related areas. More on that here.
The problem with compiling IT++ programs is that you need special flags so that the program compiles and links without problems.
Copy the path name upto the directory name that appears something like /usr/lib/pkgconfig/itpp.pc or /usr/local/lib/pkgconfig/itpp.pc.
Now, export the path name as follows:
export $PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/lib/pkgconfig/
Now, compile your program as follows:
g++ `pkg-config --cflags itpp` -o my_prog my_prog.cpp `pkg-config --libs itpp`
IT ++ is a C++ library that implements functions for digital signal processing and related areas. More on that here.
The problem with compiling IT++ programs is that you need special flags so that the program compiles and links without problems.
- If you are experiencing what you think are linkage errors, read on.
- I am only going to discuss static linking, since I have not implemented dynamic linking yet.
- Static linking creates MBs and MBs worth object code, whereas dynamic linking reduces the size exponentially.
- Follow the link here.
- If that didn't work, do as follows.
Copy the path name upto the directory name that appears something like /usr/lib/pkgconfig/itpp.pc or /usr/local/lib/pkgconfig/itpp.pc.
Now, export the path name as follows:
export $PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/lib/pkgconfig/
Now, compile your program as follows:
g++ `pkg-config --cflags itpp` -o my_prog my_prog.cpp `pkg-config --libs itpp`
No comments:
Post a Comment