Skip to main content
added 289 characters in body
Source Link
Luchian Grigore
  • 259.9k
  • 68
  • 467
  • 635

If all else fails, recompile.

I was recently able to get rid of an unresolved external error in Visual Studio 2012 just by recompiling the offending file. When I re-built, the error went away.

This usually happens when two (It'sor more) libraries have a large codebasecyclic dependency. Library A attempts to use symbols in B.lib and there is a lot of black magic when it comeslibrary B attempts to build orderuse symbols from A.lib. Neither exist to start off with. When you attempt to compile A, dependenciesthe link step will fail because it can't find B.lib. A.lib will be generated, but no dll. You then compile B, which will succeed and includes that I don't currently understandgenerate B.)lib. Re-compiling A will now work because B.lib is now found.

If all else fails, recompile.

I was recently able to get rid of an unresolved external error in Visual Studio 2012 just by recompiling the offending file. When I re-built, the error went away.

(It's a large codebase and there is a lot of black magic when it comes to build order, dependencies, and includes that I don't currently understand.)

If all else fails, recompile.

I was recently able to get rid of an unresolved external error in Visual Studio 2012 just by recompiling the offending file. When I re-built, the error went away.

This usually happens when two (or more) libraries have a cyclic dependency. Library A attempts to use symbols in B.lib and library B attempts to use symbols from A.lib. Neither exist to start off with. When you attempt to compile A, the link step will fail because it can't find B.lib. A.lib will be generated, but no dll. You then compile B, which will succeed and generate B.lib. Re-compiling A will now work because B.lib is now found.

Source Link
sgryzko
  • 2.4k
  • 2
  • 24
  • 38

If all else fails, recompile.

I was recently able to get rid of an unresolved external error in Visual Studio 2012 just by recompiling the offending file. When I re-built, the error went away.

(It's a large codebase and there is a lot of black magic when it comes to build order, dependencies, and includes that I don't currently understand.)