Cinderを使ってみたいと思っています。
Cinderのサイトからファイルをダウンロードし、解凍されたcinder_0.9.1_macという名前のファイルごと/Users/hiroshi/に置きました。
以前質問し回答いただいた内容を参考に、
$ export CPATH = /Users/hiroshi/cinder_0.9.1_mac/include
とし、
# ソースコードは以下に記載しますが、ファイル名はcinder.cppとしています。 $ /usr/bin/clang++ -std=c++11 cinder.cpp -I /Users/hiroshi/cinder_0.9.1_mac/include/cinder
とすることで、
C++
1// ファイル名はcinder.cpp 2 3#include<iostream> 4#include "cinder/Area.h" 5using namespace std; 6 7int main(){ 8 9 cout << "success\n" ; 10 return 0; 11} 12
は問題なくコンパイルできるのですが、試しにインクルードするライブラリを変えてみた次のコード
C++
1 2#include<iostream> 3#include "cinder/app/App.h" 4sing namespace std; 5 6int main(){ 7 8 cout << "success\n" ; 9 return 0; 10} 11
だとコンパイルができません。
エラーが以下のように表示されます。
C++
1Undefined symbols for architecture x86_64: 2 "boost::system::system_category()", referenced from: 3 ___cxx_global_var_init.2 in cinder-57c6a0.o 4 "boost::system::generic_category()", referenced from: 5 ___cxx_global_var_init in cinder-57c6a0.o 6 ___cxx_global_var_init.1 in cinder-57c6a0.o 7ld: symbol(s) not found for architecture x86_64 8clang: error: linker command failed with exit code 1 (use -v to see invocation) 9
他にも、同様なエラーがでるヘッダファイルがいくつかあります。
調べて見ても、自分では理解できなかったので、どなたか解決策をご教示いただけますでしょうか。
OSはMac10.14.6です。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/08/10 05:26
2019/08/10 05:28
2019/08/10 05:42