LoginSignup
1
1

More than 5 years have passed since last update.

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

Last updated at Posted at 2015-04-26

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
1
1
0

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
  3. You can use dark theme
What you can do with signing up
1
1