非MFC静态库 如何导出类? 调用者如何使用哦如何只关闭函数安全提示警告?  知道的说下 谢谢!

解决方案 »

  1.   

    对于 .LIB 库,只有函数,没有类.
    对于某些 .DLL 库或 .OCX 控件,可在 VC IDE 里导出类.
    "如何只关闭函数安全提示警告?"不明白何意.在哪里出的告警?
      

  2.   

    比如 sprintf ...微软编译器会提示  要我们使用 sprintf_s如何只关闭安全性警告而不关闭 c或者C++函数标准警告?
      

  3.   

    关闭安全警告MSDN里边有:There are several ways to eliminate deprecation warnings for the older, less secure functions. The simplest is simply to define _CRT_SECURE_NO_WARNINGS or use the warning pragma. Either will disable deprecation warnings, but of course the security issues that caused the warnings still exist. It is far better to leave deprecation warnings enabled and take advantage of the new CRT security features.define _CRT_SECURE_NO_WARNINGS就好
      

  4.   

    There are several ways to eliminate deprecation warnings for the older, less secure functions. The simplest is simply to define _CRT_SECURE_NO_WARNINGS or use the warning pragma. Either will disable deprecation warnings, but of course the security issues that caused the warnings still exist. It is far better to leave deprecation warnings enabled and take advantage of the new CRT security features.上面的居然看不清楚
      

  5.   

    可以在源程序里加上
    #pragma warning( disable : 4507 4689)
    禁止 4507 和 4689 告警.
    至于告警编号,你可以看编译器的输出,Cxxxx 中的 xxxx就是告警号.