开发者

Resource File VS2010: Images missing when copying product

开发者 https://www.devze.com 2023-02-07 05:21 出处:网络
I am creating a c++ dll which includes some images in the png format using VS2010. This works fine as long as I keep the dll on my developer machine. When I try to copy the dll to another machine the

I am creating a c++ dll which includes some images in the png format using VS2010. This works fine as long as I keep the dll on my developer machine. When I try to copy the dll to another machine the images are missing. When I compile my project, a file called app.res is placed in the build directory. If I look into that file, it seems to contain some binary encoded pngs. The project settings 开发者_StackOverflow社区contain a entry called "Resource File Name" in the "Resources" section. The value is "app.res". Therefor I assume that my resources are added to the dll. However, it apperently doesn't work that way. Does anyone have any ideas what could be wrong here? Does anyone know of any good instructions on how to deals with resource files in VS2010. The Microsoft documents just didn't help much..


The linker embeds the .res file in the DLL. Verify this with File + Open + File, select your DLL, you can browse the embedded resources. There is otherwise no mechanism to make embedded resources disappear when you copy the DLL, they are firmly embedded.

0

精彩评论

暂无评论...
验证码 换一张
取 消