spirit-code / spirit

Atomistic Spin Simulation Framework
http://spirit-code.github.io
MIT License
117 stars 52 forks source link

Compilation Failed on Windows Desktop GUI #614

Closed LightoRuby closed 2 years ago

LightoRuby commented 2 years ago

Dear Spirit users and developers,

I have compiled a solution file by using the order ' cmake -G "Visual Studio 15 2017 Win64" .. ', and the compilation completed successfully! The 'spirit.sln' successfully appeared in the 'build' folder. However, when I use Virtual Studio 2017 to run 'spirit.sln', there is a failed appeared in the Error List. The error is as follows

image

new1.TXT

The last few lines of Output are as follows:

11>E:\application\spirit\spirit.exe : fatal error LNK1120: 1038 unresolved externals
11>Done building project "Spirit_UI_CPP.vcxproj" -- FAILED.
19>------ Build started: Project: 5, Configuration: Debug x64 ------
19>Building Custom Rule E:/application/spirit/CMakeLists.txt
20>------ Skipped Build: Project: INSTALL, Configuration: Debug x64 ------
20>Project not selected to build for this solution configuration 
21>------ Skipped Build: Project: PACKAGE, Configuration: Debug x64 ------
21>Project not selected to build for this solution configuration 
========== Build: 17 succeeded, 1 failed, 0 up-to-date, 3 skipped ==========

This is my version of each software:

I don't know which step went wrong when compiling, can someone help me?

Best regards,

LightoRuby

LightoRuby commented 2 years ago

There is an output file for 'Generate a solution file' new2.TXT

GPMueller commented 2 years ago

I've had this problem so far due to

In your case, I suspect the second, because your log contains -- >> Found Qt at: "E:/Qt/5.14.2/mingw73_64/lib/cmake/Qt5". You installed the mingw binaries of Qt, but you are trying to compile using msvc_2017. Try re-installing Qt, but this time select msvc_2017 in the installer.

LightoRuby commented 2 years ago

Thank you very much! I have tried the second solution by selecting mscv_2017 in the QT installer, and successfully compiled.