Skip to content

Instantly share code, notes, and snippets.

@geekoff7
Last active July 22, 2018 15:10
Show Gist options
  • Select an option

  • Save geekoff7/21ca1627fb222bd5cfafeab0de0636f6 to your computer and use it in GitHub Desktop.

Select an option

Save geekoff7/21ca1627fb222bd5cfafeab0de0636f6 to your computer and use it in GitHub Desktop.
compile libcpuid shell command
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
# in fish shell
echo (pkg-config libcpuid --cflags --libs) | xargs gcc main.c -o program
# in zsh or bash shell
gcc main.c -o program `pkg-config libcpuid --cflags`
export LD_LIBRARY_PATH=/usr/local/lib/
# run program
./program
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment