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?

Était-ce utile?

La 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

Autres conseils

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

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top