0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

コンパイルエラーとリンカーエラーの違い

Last updated at Posted at 2025-05-27

最初に

ビルドエラーとリンカエラーの認識が曖昧だったので、備忘録として記録。


ビルドとは?

  • ソースコード → オブジェクトファイル(.o)→ 実行ファイル(例:.exe,バイナリ)を作成すること

コンパイル(.c → .o

起きやすいエラーの例:

  • 文法ミス
  • 未定義の変数や関数の呼び出し

リンク(.o → 実行可能な形式のファイル

起きやすいエラーの例:

  • 宣言はあるけど定義がない
  • 関数や変数の本体が見つからない

まとめ

  • コンパイルエラー → 文法ミスなど、ソースコード自体に問題あり
  • リンクエラー → ソース上は問題ないが、呼び出し先の中身が見つからない
0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?