LoginSignup
1

More than 5 years have passed since last update.

posted at

updated at

Organization

ossp-uuidを使ったマルチプラットフォームで動くコードを書くには

ossp-uuidを入れる

osx

HomeBrewだと

brew install ossp-uuid

Linux

sudo apt-get install libossp-uuid-dev

OSXのHomebrewでは

pkg-config uuid --cflags

と名前にuuidを指定すれば、良かったが、
Linux(Ubuntu)だとuuidではなく、ossp-uuidを指定する必要があった。

これでは、OS毎に条件分岐でpkg-configを実行する必要がある。

解決方法

uuid-configを使う

ヘッダファイルのパス指定

uuid-config --cflags

ライブラリリンク時のオプション指定

uuid-config --ldflags --libs

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
What you can do with signing up
1