vc++ compile error RC : fatal error RC1107: invalid usage; use RC /? for
Solution 1
Solution: Add a slash to the last include path will do the trick. If your last include path already contain a slash at the end, delete it will also work.
Note: Some other include paths can cause this too; it doesn't have to be the very last include path. In particular, check the last include path that you add (in addition to the built-in ones) in your project/properties file.
Solution 2
I had a similar problem. I solved it removing the trailing backslash from the last path in Include Directories
(from Project Properties | Configuration Properties | VC++ Directories
).
Solution 3
I also solved this problem by removing VS include path "\" from last entry.
Solution 4
I got this when upgrading from VS2008 to VS2010. None of the suggested solutions worked for me.
What worked for me was deleting all the files in the configuration build folder (e.g. Release) and rebuilding the solution.
Solution 5
My solution for VS2010:
click menu "Project","Properties"
to open Property pages.
click "Configuration properties", "general"
to change Output Directory from "$(Configuration)\ \"
to "$(Configuration)\"
,change interminably directory from "$(SolutionDir)$(Configuration)\ \"
to "$(SolutionDir)$(Configuration)\"
.recompile and it's OK.
Comments
-
Rahul almost 2 years
I am getting following error while building my vc++ project (Using visual studio 2010)
RC : fatal error RC1107: invalid usage; use RC /? for
I know there is some issue while building resources but how to get the exact problem area?
Thanks
-
icabod about 11 yearsIn my case this issue started to occur on a newly-created project, after I had added BOOST environment variable to the include paths of Visual Studio (tools->options->Projects and Solutions->VC++ Directories). As I was using a variable, I just added
\.
to the end, which seemed to work. -
blackbada_cpp over 10 yearsThanks for saving me from headache
-
Unicorn over 7 yearsparticularly amazing!
-
zzz almost 7 yearsStill true and fix works years later in VS 2017. Thank you
-
goldstar about 6 yearsI so much love this solution!
-
Varaquilex almost 6 yearsThis still is the solution... Had a '\' at the end of my last include path, removing it did the job. Thank you!
-
Joseph Willcoxson over 3 yearsJanuary 24, 2021 This is still a bug in Visual C++ 2019. Thanks.
-
auhmaan about 2 yearsThis does not provide an answer to the question. Once you have sufficient reputation you will be able to comment on any post; instead, provide answers that don't require clarification from the asker. - From Review
-
E235 almost 2 yearsWhat does it mean? If my last include is:
#include <time.h>
, I need to add#include <time.h>\`
? it will cause compilation error. Also in case you meant#include <time.h\>
, also compilation error. Please explain with an example. -
rtischer8277 almost 2 yearsVS 2022 17.3.0 v1.1 still has this problem a decade later. Neither adding nor substracting the '/' has solved it for me. Time to try and isolate it and report it for real to MS's dev community. I'll put a link back here if I succeed.
-
rtischer8277 almost 2 yearsFound a dev comm link: RC : fatal error RC1107: invalid usage; use RC /? for Help.
-
rtischer8277 almost 2 yearsI added to the VS dev community site: RC : fatal error RC1107: invalid usage; use RC /? for Help. A day later, MS VS closed it un-fixed and no plans to fix it or even address it.