1

VisualStudio2010にLinuxCプロジェクトを移植しています。Linuxでは次のフォルダープロジェクト構造があります。

ProjectName->Src->ソースCファイルProjectName->Header->Cに関連するソースHファイル

コンパイルエラーなしで同じ構造を再作成するようにVisualStudio2010を構成するにはどうすればよいですか?インクルードフォルダーを作成し、コンパイラーにインクルードフォルダーを通知する方法。単純なフォルダにインクルードファイル(既存の要素)を追加することさえできません。追加しても表示されません。

4

1 に答える 1

2

On the C/C++ configuration tab is the Additional Include Directories option. Set it to the following:

$(ProjectDir)/Header

That should do it. Don't forget to do it for all your configs (debug, release, etc).

Oh, and regarding adding new header files, when you open the Add.. option to add a new file, pay close attention to the BOTTOM of the dialog. it will tell you where it will be placed, and you can change it there.

于 2012-09-03T08:21:25.130 に答える