kevoreilly / capemon

capemon: CAPE's monitor
GNU General Public License v3.0
102 stars 49 forks source link

Capemon failed to build with fatal error C1047: The object or library file 'F:\gitP\kevoreilly\capemon\\libyara\lib\libyara64.lib' was created by a different version of the compiler than other objects like 'x64\Release\alloc.obj' #71

Closed KarenHuang2016 closed 10 months ago

KarenHuang2016 commented 10 months ago

We are building Capemon with Visual Studio 2022 17.8.4 on Windows. It failed to build with fatal error C1047: The object or library file 'F:\gitP\kevoreilly\capemon\libyara\lib\libyara64.lib' was created by a different version of the compiler than other objects like 'x64\Release\alloc.obj'; rebuild all objects and libraries with the same compiler. Could you please help to take a look? Thanks in advance!

Steps to reproduce:

  1. Open VS2022 x64 CMD.
  2. git clone https://github.com/kevoreilly/capemon F:\gitP\kevoreilly\capemon
  3. pushd F:\gitP\kevoreilly\capemon
  4. msbuild /m /p:Platform=x64 /p:Configuration=Release /p:WindowsTargetPlatformVersion=10.0.22621.0 /p:PlatformToolset=v143 capemon.sln /t:Rebuild

Actual result: LINK : fatal error C1047: The object or library file 'F:\gitP\kevoreilly\capemon\libyara\lib\libyara64.lib' was created by a different version of the compiler than other objects like 'x64\Release\alloc.obj'; rebuild all objects and libraries with the same compiler [F:\gitP\kevoreilly\capemon\capemon.vcxproj] LINK : fatal error LNK1257: code generation failed [F:\gitP\kevoreilly\capemon\capemon.vcxproj] LINK : fatal error C1047: The object or library file 'F:\gitP\kevoreilly\capemon\libyara\lib\libyara64.lib' was created by a different version of the compiler than other objects like 'x64\Release\alloc.obj'; rebuild all objects and libraries with the same compiler [F:\gitP\kevoreilly\capemon\capemon.vcxproj] LINK : fatal error LNK1257: code generation failed [F:\gitP\kevoreilly\capemon\capemon.vcxproj]

Attached build log file: build.log

kevoreilly commented 10 months ago

Hi Karen! I'm really sorry but unfortunately I can't help with this as I don't have time to support 'unsupported' versions of visual studio! I won't waste any of your time or mine asking why you are using visual studio 2022 when the supported version is 2017.

My advice is to forget 2022 and go with 2017.

kevoreilly commented 10 months ago

N.B. https://github.com/kevoreilly/capemon/issues/61