vc++ compile error RC : fatal error RC1107: invalid usage; use RC /? for

11,129

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.

Share:
11,129
Rahul
Author by

Rahul

I am a c++ programmer.

Updated on June 14, 2022

Comments

  • Rahul
    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
    icabod about 11 years
    In 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
    blackbada_cpp over 10 years
    Thanks for saving me from headache
  • Unicorn
    Unicorn over 7 years
    particularly amazing!
  • zzz
    zzz almost 7 years
    Still true and fix works years later in VS 2017. Thank you
  • goldstar
    goldstar about 6 years
    I so much love this solution!
  • Varaquilex
    Varaquilex almost 6 years
    This still is the solution... Had a '\' at the end of my last include path, removing it did the job. Thank you!
  • Joseph Willcoxson
    Joseph Willcoxson over 3 years
    January 24, 2021 This is still a bug in Visual C++ 2019. Thanks.
  • auhmaan
    auhmaan about 2 years
    This 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
    E235 almost 2 years
    What 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
    rtischer8277 almost 2 years
    VS 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
    rtischer8277 almost 2 years
  • rtischer8277
    rtischer8277 almost 2 years
    I 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.