真是恼心,这是怎么回事阿?

Developerljm 2003-12-08 10:47:32
我的程序当Release Build时,就会出现这种警告,请问高手这该怎么办啊??

LINK : warning LNK4089: all references to "ADVAPI32.dll" discarded by /OPT:REF
...全文
45 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
Developerljm 2003-12-12
  • 打赏
  • 举报
回复
你妈蛋拉,回答不了问题,跳这个刺,让人恶心
jiadrun 2003-12-09
  • 打赏
  • 举报
回复
UP
red-fly 2003-12-09
  • 打赏
  • 举报
回复
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
bishi你,樓主!!!!!!!!!

以後發貼時記住在標題中突出你問題的主要內容,至少得說出是哪個方面的問題



---------------------------------------
沒有主題的問題就像是沒有上學的學生一樣可恥!!!
---------------------------------------
Semigod 2003-12-09
  • 打赏
  • 举报
回复
就是说,你的程序根本不需要使用ADVAPI32.DLL,所以连接器优化了你的程序,你其运行不需要静态连接到ADVAPI32.DLL。这对你的程序毫无影响
Yssss1980 2003-12-08
  • 打赏
  • 举报
回复
看了MSDN文档

REF | NOREF
/OPT:REF eliminates functions and/or data that are never referenced while /OPT:NOREF keeps functions and/or data that are never referenced.
LINK removes unreferenced packaged functions by default. An object contains packaged functions (COMDATs) if it has been compiled with the /Gy option. This optimization is called transitive COMDAT elimination. To override this default and keep unreferenced COMDATs in the program, specify /OPT:NOREF. You can use the /INCLUDE option to override the removal of a specific symbol.

If /DEBUG is specified, the default for /OPT is NOREF (otherwise, it is REF), and all functions are preserved in the image. To override this default and optimize a debugging build, specify /OPT:REF. The /OPT:REF option disables incremental linking.

You have to explicitly mark data as a COMDAT; use __declspec(selectany).

If /OPT:REF is specified, /OPT:ICF is on by default. If you want /OPT:REF but not /OPT:ICF, you must specify the following:

link /opt:ref /opt:noicf
Specifying /OPT:ICF does not activate the /OPT:REF option.

是不是意味着你的程序没有使用ADVAPI32.dll里面的东西?

15,471

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 进程/线程/DLL
社区管理员
  • 进程/线程/DLL社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧