Sunday, January 3, 2021

warning LNK4070: /OUT:TESTCTL1.OCX directive in .EXP differs from output filename 'C:\Demo_CPP\TESTCTL1\Debug\TESTCTL1.exe';

when I compiled the demo from MFC from ground up, I ran into this error message:

warning LNK4070: /OUT:TESTCTL1.OCX directive in .EXP differs from output filename 'C:\Demo_CPP\TESTCTL1\Debug\TESTCTL1.exe';

the solution is:

Declare $(IntDir) in the Additional Include Directories field of the Resources Tab (General Section) in the Configuration Properties of the project by these steps:

Configuration Properties -> Resources -> General -> Additional Include Directories: set to "$(IntDir)"

Also we need to double check this configuration:

Configuration Properties -> MIDL -> Output -> Type Library -> set to: "$(IntDir)$(ProjectName).tlb"

  1. Thread: /OUT: directive in .EXP differs from output
  2. Visual C++ Cryptic Error Messages... And How to Fix Them
  3. Cannot find or open the PDB file in Visual Studio C++ 2010

No comments:

Post a Comment