dllD.exp : warning LNK4070: /OUT:dll.dll directive in .EXP differs from output filename "Debug/dllD.dll"; ignoring directive
我在DLL項目中遇到了,因爲要對Debug版和Release版分別指定不同的輸出文件名。對Debug版,我指定輸出文件爲dllD.dll,對Release版指定爲dllR.dll。
解決方法有兩個:(1)刪掉自動生成的dll.DEF文件,在代碼中使用_declspec(dllexport)導出函數;(2)刪掉dll.DEF文件中LIBRARY字段後面雙引號及其內部的庫名即可,也可以將其改掉。如改爲:
; dll.def : Declares the module parameters for the DLL.
LIBRARY "dllD"
DESCRIPTION 'dll Windows Dynamic Link Library'
EXPORTS
; Explicit exports can go here