Question

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?

Was it helpful?

Solution 2

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

OTHER TIPS

I had the same problem, reducing the optimization level from Ob2 to Ob1 ("Maximum speed" to "Minimum size") helped me, like gorkem described.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top