LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

using CVI 8.5.1, getting a RC1, resourse compiler error

Hello,

 

Am using CVI 8.5.1 on a project, and am getting a popup notifiying me of an RC1, resourse compiler error, asking me if I would like to copy the message to the clipboard...  The message it writes is:

 

"c:\program files\national instruments\cvi85\sdk\bin\rc.exe" /fo "c:\RTI\Eclipse3\cvibuild.Eclipse3\resources.res" "C:\DOCUME~1\Rick\LOCALS~1\Temp\Eclip3.rc"

 

I have not seen this before.  Can you tell me what this is, and how I should preceed to remedy it.

 

Thanks in advance

Ryykker

0 Kudos
Message 1 of 9
(7,547 Views)

Hi Ryykker,

 

This issue relates to a problem with the windows SDK, which is used with the resource compiler to provide resource use information for your application (such as the dialog template or fonts). More information on the resource compiler can be found on MSDN:

 

MSDN: The Resource Compiler

 

The easiest way to remedy this problem is to repair install the CVI environment, which can be accomplished through these steps:

 

1. Open the control panel, then click Add/Remove programs

2. Find the entry for National Instruments Software, and click change/remove

3. Find the entry for CVI 8.5.1, then click repair.  Note that you will need the CD or installation file.

 

Please let me know if you have any other questions!

Al B.
Staff Software Engineer - TestStand
CTA/CLD
0 Kudos
Message 2 of 9
(7,515 Views)

Hello Al B,

 

Just wanted to give you some feedback.  I followed your suggestion and repaired the CVI installation, however got the same results, so I started to look at other possibilities.   As it turns out, the RC1 error was due to an honest problem.    The project is one I received from a client, ... with some missing pieces.   Once I was able to obtain several .icon files, and place them in the project, the project built.

 

Thanks for your help,

Ryykker

Message 3 of 9
(7,498 Views)

Thanks, Ryykker, for the diligent follow-up. 

 

I just had the same error and your information helped me realize it was due to the newer .ICO file that I had added.  That newer file was made with IcoFX 1.6 so it would have multiple resolutions and color depths.  Reverting to the older ICO file in my target settings got rid of the compiler error.

 

NI: What, if any, are the limitations on ICO files that are supported?

 

And by the way, I was inspired to use IcoFX instead of the shipped icon editor because of the issue reported here. That problem is harder to fix post-XP due to more rigorous write-access restrictions on the Public Documents folder.

 

--Ian

Message 4 of 9
(7,404 Views)

Hi Ian,

 

CVI 8.5.x did not support Vista-style icons in the Target Settings dialog. This is the relevant item from the readme file:

 

Using Compressed Icons—To use a Windows Vista compliant icon (featuring very large icons or PNG compression), you must replace the resource compiler shipped with LabWindows/CVI with the one included in the Windows SDK released with Windows Vista. Install the SDK and copy the rc.exe and rcdll.dll files from C:\Program Files\Microsoft SDKs\Windows\v6.0\Bin to CVI85\sdk\bin.

 

This limitation was removed in CVI 9.0.

 

Sorry about the icon editor problem in 9.0.1. I take it from your last paragraph that it's not a simple matter for you to rebuild the icon editor source code and then copy the executable over to the C:\Program Files\... folder. That's completely understandable. But do keep in mind that you can still use the icon editor by running the project directly from the samples foloder. It's the same exact program as the one that you would run by launching from the Tools menu.

By the way, if you might be using the CVI icon editor to modify icons that you then need to use in CVI 8.5, the restriction above still applies: you should not use the compression option of the icon editor, nor should you create a 256x256 image in the icon file.

 

Luis

Message Edited by LuisG on 08-03-2009 11:30 AM
0 Kudos
Message 5 of 9
(7,390 Views)

Luis,

 

Thanks for the quick reply. In fact I'm using 9.0.1 and I saw that error.  I'm a bit buried this week, but will try to post some sample ICO files later that demonstrate the problem. I used IcoFX's "Create Windows Icon From Image" feature based on a 200x200 GIF.

 

--Ian

0 Kudos
Message 6 of 9
(7,376 Views)

Here is a sample of the offending icon file, and a screenshot of the IcoFx options that I selected when I made the icon file from an image. Setting this as the icon file caused the RC1 error noted above.

 

Obviously I've exceeded the specs of supported icon files in CVI 9.0.1.  What exactly is/isn't supported?

 

Thanks,

Ian

Download All
0 Kudos
Message 7 of 9
(7,176 Views)

Sorry it's taken a while to respond. I've been out of the office until this past Monday and I'm just now catching up on the backlog.

 

I can see the error that you're referring to. I think I know why it's happening, and fortunately there sems to be an easy workaround.

 

I had mentioned earlier that starting with CVI 9.0, you should be able to embed Vista-style icons in CVI binaries. It turns out that this isn't entirely true. The reason I had said that is because with the updated Windows SDK that ships with CVI 9.0, new image types in icons that were not supported earlier (256x256 images, color resolutions greater than 8 bpp) should now supported. However, this did apparently did not extend to compressed, PNG-type images in icon files. And some image editing software compresses 256x256 images by default. This restriction on using compressed images is discussed in this article (scroll down to the "Use of Windows Vista™ Compressed Icons in Software Projects" section). As you can see in the article, Microsoft has fixed their resource compiler (which CVI uses internally) for the Visual Studio 2008 release to fully support compressed images. Unfortunately, the version of the SDK that has this fix no longer supports Windows 2000, and because CVI 9.0 still must support Windows 2000, we had to base the CVI 9.0 Windows SDK on a slightly older version. And that version still had the compressed image problem.

 

Now for the workaround. 

 

You can load this icon in the CVI icon editor that ships with CVI 9.0.1. Once you do, you need only scroll down to the compressed image, change the Compressed option from "yes" to "no" and then resave the icon. The file will become bigger, but you should now be able to use it in the CVI Target Settings dialog.

 

Sorry for the hassle. We'll make a note of this restriction in the documentation for the Target Settings dialog.

 

Luis

Message 8 of 9
(7,114 Views)

Thanks, Luis. That is very helpful and it solved the issue for me. 

 

If I could, I'd mark your post as the solution for the thread.

 

--Ian

Message Edited by Ian W on 10-02-2009 05:01 PM
0 Kudos
Message 9 of 9
(7,081 Views)