Monday, June 25, 2007 1:39 PM
I'm using Microsoft Visual Studio 2005 (SP1). I need to include more than 93 directories in the "Aditional inlcude directories" parameter of General Resources, in the project properties window . When I put 93 directories and when I try to compile the resources, it gives me the following error:
1>fatal error RC1047: too many -I# options, 'C:\Program Files (x86)\Microsoft Visual Studio 8\SDK\v2.0\include'
1>Project : error PRJ0002 : Error result 1 returned from 'C:\Program Files (x86)\Microsoft Visual Studio 8\VC\bin\rc.exe'.
Is there any way to increase the number of possible aditional include directories?
Monday, June 25, 2007 2:16 PM
If you really need this, I would suggest the following way. Put all of –I options in a separate text file (one option per line), e.g.:
. . .
Then in Properties dialog of you project, in C/C++ à Command Line field, type "@" followed by relative path of the above file. For example: "@my_options.txt".
I hope it works.
Monday, June 25, 2007 2:24 PMI am not sure if you can do that from IDE, but definitly you can add remaining directories to PATH env. variable.
Monday, June 25, 2007 9:47 PM
1) You might be able to add 93 directories to PATH if each has a 1- or 2-character name, but that's not likely.
2) Even if you could, it would be pointless; PATH is meaningless to the resource compiler.
Like this message says, please be careful about raising the noise level of the forum with incorrect responses. Especially when posting with the "MVP" tag.
Monday, June 25, 2007 9:49 PM
"I need to include more than 93 directories in the "Aditional inlcude directories" parameter of General Resources, in the project properties window "
Probably not. That may be how the project is currently constructed, but that doesn't mean that you really *need* a hundred include directories. Refactor the project to a more reasonable configuration. One bonus will be improved build performance, since the compiler doesn't have to search a hundred different places for included files.
Tuesday, June 26, 2007 7:58 AM
The solution to use a command file (at sign (@) followed by a filename) seems a good solution but is not possible to use it with the RC compiler.
The solution to change the PATH env. variable or the VC++ Include Directories, is not very flexible because this directories are shared for all projects. It can be difficult to apply if each project has different include directories, using different libraries. For example, project1 use library ITK3.2 and project2 use library ITK1.6, so each time I compile project1 or project2 I need to change the include directories.
Perhaps I need to refactor the project. In our project we use different external libraries like ITK, VTK and MITK. Actually we add all the source code library directories to our project. This isn't the correct manner. We need to build an install for each external library. This generates the only needed files and contains few directories: some include directories and some lib directories.
Thanks for all for your answers!
Tuesday, June 26, 2007 6:46 PM
Another benefit will be that, unless your xTK libraries change rapidly, you won't be building them every time you build the code that uses them. Any time you can factor non-changing code out to a static library or DLL project you speed up the work on your client projects.