visual-studio-2008visual-c++visual-c++-2008

project won't link in release mode error lnk1181


I have a project that i can compile and link in debug mode, but i am not able to link in release mode. I can compile, but not link.

The error i get is

fatal error LNK1181: cannot open input file '.\Release\Class1.obj'

I am using MS Visual Studio 2008, Visual C++. Is something missing in project properties, any ideas?

EDIT: If i delete '*.obj' files in Debug folder, then build in Debug mode, it generates those files and builds. How do i get it to generate the files in Release mode?


Solution

  • I was toying with project settings, comparing to debug mode. I made the following changes and i can link now.

    Optimization = Disabled (/Od)

    Inline function Expansion = Default

    Generate Preprocessed File = No