CHương trình của mình build 1 thư viện Static lib sử dụng stdafx.h và file exe sử dụng lib không chứa stdafx.h
sau khi linker file .lib ( build dạng Release ) vào project ở dạng debug thì nó báo lỗi thế này:
MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance
2>LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/LTCG' specification
Mọi người có ai hiểu biết về nguyên nhân, cách khắc phục thì giúp tớ nhé
à khai báo chút về cấu hình
OS: windows 7
VS 2008
thank
đây là Project đơn giản mình minh họa:
Mã:
#include <Windows.h>
#include "../LibsTest/LibsTest.h"
#pragma comment(lib,"../release/LibsTest.lib")
int WINAPI WinMain( __in HINSTANCE hInstance, __in_opt HINSTANCE hPrevInstance, __in_opt LPSTR lpCmdLine, __in int nShowCmd )
{
Sum2Int(2,4);
return 0;
}
Nếu Build ở chế độ Debug thì nó sẽ bắn ra cái warring ,và nếu project libs mà nhỏ thì không sao,nếu lớn thì hay xảy ra tình trạng xung đột libs,ý định của mình là muốn build libs ở chế độ debug vẫn có thể dùng được( mình thấy libs của MIcrosoft sinh ra chạy rất tốt trong cả debug lẫn Release mà )
2>LibsTest.lib(Test.obj) : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance
2>LINK :
warning LNK4075: ignoring '/INCREMENTAL' due to '/LTCG' specification
2>LINK :
warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
2>LibsTest.lib(Test.obj) : warning LNK4099: PDB 'vc90.pdb' was not found with '../release/LibsTest.lib' or at 'C:\Users\Admin\Desktop\LibsTest\Debug\vc90.pdb'; linking object as if no debug info
2>LibsTest.lib(stdafx.obj) : warning LNK4099: PDB 'vc90.pdb' was not found with '../release/LibsTest.lib' or at 'C:\Users\Admin\Desktop\LibsTest\Debug\vc90.pdb'; linking object as if no debug info
View more random threads:
Ngoại trừ một số ít trường hợp rãnh mũi - má và “râu rồng silicon” xuất hiện sớm, có khi từ tuổi thanh niên do cơ địa, còn lại, đại đa số do căn do lão hoá đã gây nên ba diễn biến: Giảm mô xương gò...
Cách thẩm mỹ má ở tuổi trung niên...