Skip to content

Instantly share code, notes, and snippets.

@kushalsahare
Last active February 7, 2017 20:09
Show Gist options
  • Select an option

  • Save kushalsahare/52839f90592a585cfc235825ca712315 to your computer and use it in GitHub Desktop.

Select an option

Save kushalsahare/52839f90592a585cfc235825ca712315 to your computer and use it in GitHub Desktop.
C++ tips & tricks
Put `pkg-config --cflags --libs *pkg_name*
$ g++ test.cpp -o test `pkg-config --cflags --libs opencv`
Other Libraries:
OpenCV : `pkg-config --cflags --libs opencv`
GSL : `pkg-config --cflags --libs gsl`
Eigen3: `pkg-config --cflags --lib eigen3`
KDL : `pkg-config --cflags --libs orocos-kdl`
* Try printing without ` ` in your terminal e.g. using eigen3 you should see something like this
user@user:~ $ pkg-config --cflags --libs eigen3
-I/usr/include/eigen3
or using gsl
user@user:~ $ pkg-config --cflags --libs gsl
-lgsl -lgslcblas -lm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment