3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

NAOqi C++ 開発環境のインストール(OS X 環境)

Posted at

はじめに

これで Pepper 用に C++ でプログラミングできるのだろうか、という好奇心だけで試してみています。正直なところまださっぱり分かっていません。

以下の記事を参考にさせて頂き、ほぼそのままなぞっています。

OS X 環境での make 時エラーの解決

元記事同様にエラーが発生しました。

$ qibuild make -c mytoolchain
Current build worktree: /path/to/naoqi-sdk-1.14.5-mac64/doc/examples
Using toolchain: mytoolchain
Build type: Debug
* (1/1) Building helloworld
Scanning dependencies of target helloworld
[ 33%] Building CXX object CMakeFiles/helloworld.dir/helloworld.cpp.o
[ 66%] Building CXX object CMakeFiles/helloworld.dir/main.cpp.o
Linking CXX executable sdk/bin/helloworld

...

ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [sdk/bin/helloworld] Error 1
make[1]: *** [CMakeFiles/helloworld.dir/all] Error 2
make: *** [all] Error 2
[ERROR]:  BuildFailed Error occurred when building project helloworld

Aldebaran の Community を見ていたところ、それっぽい情報があり CMakeLists.txt に一行追加したところ make が通るようになりました。

CMakeLists.txt
# Copyright (C) 2011 Aldebaran Robotics
cmake_minimum_required(VERSION 2.6.4 FATAL_ERROR)

set(CMAKE_CXX_FLAGS "-stdlib=libstdc++")

...
$ qibuild make -c mytoolchain
Current build worktree: /path/to/naoqi-sdk-1.14.5-mac64/doc/examples
Using toolchain: mytoolchain
Build type: Debug
* (1/1) Building helloworld
-- Using qibuild 3.7
-- Binary: helloworld
-- Binary: testhelloworld
-- Configuring done
-- Generating done
-- Build files have been written to: /path/to/naoqi-sdk-1.14.5-mac64/doc/examples/core/helloworld/build-mytoolchain
[ 33%] Building CXX object CMakeFiles/helloworld.dir/helloworld.cpp.o
[ 66%] Building CXX object CMakeFiles/helloworld.dir/main.cpp.o
Linking CXX executable sdk/bin/helloworld
[ 66%] Built target helloworld
Scanning dependencies of target testhelloworld
[100%] Building CXX object CMakeFiles/testhelloworld.dir/testhelloworld.cpp.o
Linking CXX executable sdk/bin/testhelloworld
[100%] Built target testhelloworld

感想

  • make はできたみたいだけど、これをどうしたら良いのか分かりません。まだまだ英語ドキュメントと格闘中。
3
3
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
3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?