Jayaprakash
Jayaprakash

Reputation: 25

C1047 The object or library file '' was created by a different version of the compiler

I am migrating VC++ project from VisualStudio2015 to VisualStudio2019.

One of the project reporting below error,

Error C1047 The object or library file 'Library Path' was created by a different version of the compiler than other objects like 'Object file path'; rebuild all objects and libraries with the same compiler.

I tried to rebuild all the project and use existing compiler object file. But problem not solved.

Can anyone give solution to resolve this issue?

Upvotes: 0

Views: 3495

Answers (2)

Jayaprakash
Jayaprakash

Reputation: 25

I followed below step , issue got resolved.

Error C1047 The object or library file 'Library Path' was created by a different version of the compiler than other objects like 'Object file path'; rebuild all objects and libraries with the same compiler.

  1. compile the reported Library Path project in same compiler [VS2019:Toolset 142].
  2. Verify that library created.
  3. clean all binary,lib and object files from issue reported project.
  4. copy the new library to respective folder or If project has any pre-build step , dont copy the library file.
  5. Build the project with same compiler.

Upvotes: 0

JohnCz
JohnCz

Reputation: 1609

To resolve C1047, rebuild all object files or libraries by using the same version of the toolset.

Found here

Upvotes: 0

Related Questions