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.
定義を含めるための -D フラグがあるように、コンパイルされるすべてのファイルにヘッダー ファイルを含めるために makefile で使用できるフラグがあることを私は知っています。ヘッダーファイルを含めるための正確なフラグは何ですか。私は覚えていません。
コンパイル コマンドでは、次の-includeオプションを使用できます。
-include
gcc -o main -include hello.h main.cpp
このようなものでしょうか?include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)