如何在 VS2008 中强命名 C++ 程序集? [英] How do I strong name a C++ assembly in VS2008?

查看:35
本文介绍了如何在 VS2008 中强命名 C++ 程序集?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我没有在 Windows 上开发 C++ 的经验,但我是一名 C# 开发人员.

I have no experience developing C++ on Windows, but I am a C# developer.

我对一些用 C++ 编写的本机 DLL 进行了包装.(一个 LGPL 项目)).我要从一个强命名程序集使用它.

I have a wrapper around some native DLLs that is written in C++. (A LGPL project)). I was to use this from a strong named assembly.

如何设置 C++ 程序集的强命名?没有像 C# 项目中那样的签名"属性选项卡可用.

How do I set up the strong naming of the C++ assembly? There is no 'Signing' properties tab available as there is in C# projects.

我想我需要编辑 vcproj 文件并引用密钥文件,例如

I imagine that I need to edit the vcproj file and put a reference to the key file, something like

 /KEYFILE:"sgKey.snk" 

我在这个网站上找到的:http://www.windows-tech.info/17/6a8f0ab94246fb61.php

that I found at this site: http://www.windows-tech.info/17/6a8f0ab94246fb61.php

我相信一旦我找到了正确的参考资料就会很容易.有人能指出我正确的方向吗?

I'm sure it will be easy once I find the right reference. Can someone point me in the right direction?

对于 C++ 开发人员来说,一个简单的问题来获得一些代表点数.

An easy question for C++ devs to get some rep points out of.

谢谢.

推荐答案

我找到了.出于某种原因,当我第一次单击项目时,属性页显示为空.重试时,我在项目属性页中找到了它.

I found it. For some reason the first time I clicked on the project the property pages came up empty. On retry I found it in the project property page.

Configuration Propertyes|Linker|Advanced|Key File. 

只需输入 snk 密钥文件的路径即可.

And just enter the path to the snk key file.

感谢您的关注.

这篇关于如何在 VS2008 中强命名 C++ 程序集?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆