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:
Thông qua phân tích dữ liệu Google từ 86 quốc gia, mới đây, một công ty tại Anh đã công bố bảng xếp hạng kích tấc "cậu nhỏ" của các nước trên thế giới. Kết quả, hầu hết các nước xếp ở nhóm đầu của...
"Chim" của chàng trai Việt thuộc...