Ubuntu/C言語環境の構築(Ubuntu8.04)
の編集
Top
/
Ubuntu
/
C言語環境の構築(Ubuntu8.04)
[
トップ
] [
編集
|
差分
|
バックアップ
|
添付
|
リロード
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
]
-- 雛形とするページ --
(no template pages)
#navi(../) * Ubuntu8.04でCソースのコンパイルができるようにする [#kf2ad0d1] 定番のHello Worldソースを作りコンパイルしようとしたところ、エラーメッセージが… :( #contents #htmlinsertpcsp(linux_ads_top.html,linux-sp.html) * コンパイルを可能にするための手順 build-essentialをインストールすれば、Cソースをコンパイルする環境が構築できます。 -geditでhello.cを作成 #ref(gedit-hello_c.jpg) -コンパイル結果 $ gcc hello.c hello.c:1:19: error: stdio.h: No such file or directory hello.c: In function ‘main’: hello.c:5: 警告: incompatible implicit declaration of built-in function ‘printf’ #ref(gcc-error.jpg) ** build-essentialパッケージをインストールすれば解決 [#e3aa8010] &color(red){build-essential};をインストールすればコンパイルできる環境を構築できます。 :) -Synapticを起動しbuild-essentialをインストール #ref(synaptic-build-essential.jpg) -インストールされるパッケージ #ref(build-essential-install-pkgs.jpg) **再度コンパイルし実行 [#b41825b8] パッケージインストール後、無事コンパイルができました。 :)~ -コンパイルによって作成されたa.outを実行した結果 #ref(gcc-success.jpg) #htmlinsertpcsp(linux_ads_btm.html,linux-sp.html) #br
タイムスタンプを変更しない
#navi(../) * Ubuntu8.04でCソースのコンパイルができるようにする [#kf2ad0d1] 定番のHello Worldソースを作りコンパイルしようとしたところ、エラーメッセージが… :( #contents #htmlinsertpcsp(linux_ads_top.html,linux-sp.html) * コンパイルを可能にするための手順 build-essentialをインストールすれば、Cソースをコンパイルする環境が構築できます。 -geditでhello.cを作成 #ref(gedit-hello_c.jpg) -コンパイル結果 $ gcc hello.c hello.c:1:19: error: stdio.h: No such file or directory hello.c: In function ‘main’: hello.c:5: 警告: incompatible implicit declaration of built-in function ‘printf’ #ref(gcc-error.jpg) ** build-essentialパッケージをインストールすれば解決 [#e3aa8010] &color(red){build-essential};をインストールすればコンパイルできる環境を構築できます。 :) -Synapticを起動しbuild-essentialをインストール #ref(synaptic-build-essential.jpg) -インストールされるパッケージ #ref(build-essential-install-pkgs.jpg) **再度コンパイルし実行 [#b41825b8] パッケージインストール後、無事コンパイルができました。 :)~ -コンパイルによって作成されたa.outを実行した結果 #ref(gcc-success.jpg) #htmlinsertpcsp(linux_ads_btm.html,linux-sp.html) #br
テキスト整形のルールを表示する
添付ファイル:
build-essential-install-pkgs.jpg
561件
[
詳細
]
gcc-success.jpg
542件
[
詳細
]
gedit-hello_c.jpg
631件
[
詳細
]
synaptic-build-essential.jpg
602件
[
詳細
]
gcc-error.jpg
550件
[
詳細
]