一个警告warning C4273,不知道什么意思我在一个动态库里有一个类CSheetPal,
编译的时候报n条警告
warning C4273: 'CSheetPal::CSheetPal' : inconsistent dll linkage. dllexport assumed.
warning C4273: 'CSheetPal::~CSheetPal' : inconsistent dll linkage.  dllexport assumed.
warning C4273: 'LoadIni' : inconsistent dll linkage.  dllexport assumed.
……
类CSheetPal里的每个函数都都一个警告,但是不影响程序执行。
不知道怎么回事,望指教。

解决方案 »

  1.   

    Compiler Warning (level 1) C4273
    'identifier' : inconsistent DLL linkage. dllexport assumedThe specified member function was declared in a class with dllexport linkage, and then was imported. This warning can also be caused by declaring a member function in a class with dllimport linkage as neither imported nor static nor inline.The function was compiled as dllexport.
      

  2.   

    'function' : inconsistent DLL linkageTwo definitions in a file differ in their use of dllimport.The following sample generates C4273:// C4273.cpp
    char __declspec(dllimport) c;
    char c;   // C4273, delete this line or the line above to resolveint main()
    {
    }