Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ビルドに問題があります。私のエラーは次のようなものです: "test.c" error: test.h error"
私はソースコードを持っています:
#include <test.h>
これをビルドに追加する方法は? 具体的には、このライブラリをリンクする方法は? Geany 経由でリンクできますか? オペレーティング システム ubuntu + Geany as compile
次の簡単な手順に従います。
ディレクトリを作成し、test.cとtest.hを同じディレクトリに配置します。
test.c
test.h
C ソース ファイルには、次のように記述します。
#include "test.h"#include <test.h>これは、インクルード ライブラリ パスのみで test.h を検索するのではなく、現在のディレクトリとインクルード ライブラリ パスでヘッダー ファイルを検索します。
#include "test.h"