1
1

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.

Vagrant + CppUTestからC言語開発環境の構築

Posted at

前書き

最近はC言語は使ってませんでしたが使うことになりました。
もう、テスト無しでは開発なんてできない体だから作りました。

前提

  • chefのDKは入っている。
  • OSはubuntu
  • 自分が使用する限定的な条件で作成する。

手順

とりあえず、cookbookを作ります。

cmd
$ knife cookbook create CppUTest -o ./

そして、CppUTest/recipes/default.rb(ほぼエントリポイント)を開きます。

ここでやることは以下です。

  1. CppUTestのコンパイルに必要なモジュールのインストール(automake、autoconf、libtool)
  2. CppUTestのリポジトリをcloneする
  3. Makefileの自動生成
  4. コンパイル
  5. lib、includeの配備

想定外だった手順が以下

  1. apt-getのアップデート
  2. g++のインストトール

g++は単なる忘れてただけだけど、apt-getはもう少しやりようがある気がする。
で、完成したdefault.rbが以下リンク先
リンク

Vagrantfileにレシピを読み込むように追加して

cmd
vagrant up --provision

で終わり。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?