Reputation: 4721
I'm porting a Linux C project in Visual Studio 2010. I have the following folder project structure under linux:
ProjectName->Src->Source C files ProjectName->Header->Source H files related to C
How should I configure Visual Studio 2010 to recreate the same structure without compile errors ? How to create the include folder and tell to the the compiler that is an include folder. I cannot even add include files (existing elements) in a simple folder. They simply don't appear as I add it.
Upvotes: 1
Views: 101
Reputation: 66194
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.
Upvotes: 2