7 Replies Latest reply: Jul 14, 2012 11:36 PM by shachar carmi RSS

    How to compile .rc file?

    walczakb Community Member

      Hi everyone.

       

      I'm trying to change a version of my plugin in the .r file, but it does not recompile the resource file - the version number stays the same.

       

      I tried copying custom build settings from other project to the .r file, but it doesn't seem to work at all. The .rc file stays the same despite the changes in .r file. If I remove the resource file from the project it is not linked, and if I remove it from the project directory, it says that it can't find the file, and does not compile it.

       

      Can anyone help me?

        • 1. Re: How to compile .rc file?
          shachar carmi Community Member

          first i must apologize... i laughed out loud when reading your post...

          i know it's wrong of me, and i'm not proud of it, but i did.

          to my defense, i wasn't laughing at you, i was laughing with you.

           

          to recompile a .rc file, you must delete the .rc file.

          the build steps for the .rc compiler take effect only when that file is missing.

          otherwise they just use the one that's there.

           

          i know it sounds stupid, but here's the logic:

          on windows the .r file is not used directly, and must be converted to .rc (not so on the mac).

          so when you change the .r file, no change happened in the .rc. (obviously)

          so when the plug-in is compiled the .rc file is used, and because it is unchanged, the compiler doesn't see a reason to recompile it...

          only when that file is missing does the custom build steps for the .rc file take place.

          :-)

          • 2. Re: How to compile .rc file?
            walczakb Community Member

            Thanks, but when I deleted the .rc file, then I got an error that the rc file was not to be found, even though I copied the custom build settings to .r file. I can't seem to pinpoint what else is necessary.

             

            EDIT: I did try to clean and rebuild the solution, to no avail. The rc file was not created during custom build process.

            • 3. Re: How to compile .rc file?
              shachar carmi Community Member

              ok...

              there can also be problems with the resource compiler tool when the sdk is not installed at it's default location. (c:\program files\ect...)

              that problem can also happen when the specific project you're working on is not located in the same folder as the rest of the sample projects.

              is that's the case, then the custom build step command needs to be adjusted to the different paths.

               

              and in any case, what are the exact messages you're getting from the compiler?

              • 4. Re: How to compile .rc file?
                walczakb Community Member

                1>CustomBuild:

                1>  Compiling the PiPL

                1>  Microsoft (R) C/C++ Optimizing Compiler Version 16.00.30319.01 for x64

                1>  Copyright (C) Microsoft Corporation.  All rights reserved.

                1> 

                1>  BW_Vignette.r

                1>ClCompile:

                ...

                1>  Generating Code...

                1>RC : fatal error RC1110: could not open ..\BW_Vignette.rc

                In other projects I am able to compile the rc file without any problems, it's just this one that is not working. Normally it says:

                 

                1>CustomBuild:

                1>  Compiling the PiPL

                1>  Microsoft (R) C/C++ Optimizing Compiler Version 16.00.30319.01 for x64

                1>  Copyright (C) Microsoft Corporation.  All rights reserved.

                1> 

                1>  f_crop.r

                1>  Microsoft (R) C/C++ Optimizing Compiler Version 16.00.30319.01 for x64

                1>  Copyright (C) Microsoft Corporation.  All rights reserved.

                1> 

                1>  f_crop.rrc

                1>ClCompile:

                So it looks like something is missing.

                 

                Thanks for all your efforts.

                • 5. Re: How to compile .rc file?
                  shachar carmi Community Member

                  you could try brute-force solving of the problem.

                  duplicate a working sample project, and then just copy/paste your code into it's .cpp and .h files...

                   

                  p.s.

                  i see you give your plug-ins a match name beginning the "BW".

                  so do i!!!

                  mine stands for "BitWise". what yours?

                  • 6. Re: How to compile .rc file?
                    walczakb Community Member

                    I guess that's what I'll do. Although it still bothers me. I like to know what I'm doing, not just copy/paste stuff.

                     

                    BW = Bartlomiej Walczak - my name.

                    • 7. Re: How to compile .rc file?
                      shachar carmi Community Member

                      another way of trying to pinpoint the problem:

                      in visual studio, with the properties window open, select your project, and control + click another project that compiler correctly.

                      the property window will now leave all that's the same blank, and will show only what's different.

                      (i used that a lot to hunt down differences in settings)