Page 1 of 1

SpectrumAnalyzer.sln build errors

Posted: Mon Mar 20, 2023 3:29 am
by hartung
ref: Microsoft Visual Studio Community 2022 (64-bit) - Current Version 17.4.4

I swear I haven't touched anything, :roll:

error list:
Error C2039 'sort': is not a member of 'std' SpectrumAnalyzer X:\openRAMAN\Spectrum Analyzer Suite r123\src\SpectrumAnalyzer\SpectrumAnalyzer\shared\math\optfuncs.h 251

build output:
1>camera.cpp
1>X:\openRAMAN\Spectrum Analyzer Suite r123\src\SpectrumAnalyzer\SpectrumAnalyzer\shared\utils\safe.h(80,19): error C2338: static_assert failed: 'Type not implemented!'
1>dialogs.cpp
1>X:\openRAMAN\Spectrum Analyzer Suite r123\src\SpectrumAnalyzer\SpectrumAnalyzer\shared\utils\safe.h(80,19): error C2338: static_assert failed: 'Type not implemented!'
1>icons.cpp
1>X:\openRAMAN\Spectrum Analyzer Suite r123\src\SpectrumAnalyzer\SpectrumAnalyzer\shared\utils\safe.h(80,19): error C2338: static_assert failed: 'Type not implemented!'
1>storage.cpp
1>X:\openRAMAN\Spectrum Analyzer Suite r123\src\SpectrumAnalyzer\SpectrumAnalyzer\shared\utils\safe.h(80,19): error C2338: static_assert failed: 'Type not implemented!'
1>evemon.cpp
1>X:\openRAMAN\Spectrum Analyzer Suite r123\src\SpectrumAnalyzer\SpectrumAnalyzer\shared\utils\safe.h(80,19): error C2338: static_assert failed: 'Type not implemented!'
1>exception.cpp
1>X:\openRAMAN\Spectrum Analyzer Suite r123\src\SpectrumAnalyzer\SpectrumAnalyzer\shared\utils\safe.h(80,19): error C2338: static_assert failed: 'Type not implemented!'
1>thread.cpp
1>spc.cpp
1>X:\openRAMAN\Spectrum Analyzer Suite r123\src\SpectrumAnalyzer\SpectrumAnalyzer\shared\utils\safe.h(80,19): error C2338: static_assert failed: 'Type not implemented!'
1>state.cpp
1>X:\openRAMAN\Spectrum Analyzer Suite r123\src\SpectrumAnalyzer\SpectrumAnalyzer\shared\utils\safe.h(80,19): error C2338: static_assert failed: 'Type not implemented!'
1>winmain.cpp
1>X:\openRAMAN\Spectrum Analyzer Suite r123\src\SpectrumAnalyzer\SpectrumAnalyzer\shared\utils\safe.h(80,19): error C2338: static_assert failed: 'Type not implemented!'
1>Running Code Analysis for C/C++...
1>Generating Code...
1>Done building project "SpectrumAnalyzer.vcxproj" -- FAILED.
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
========== Elapsed 00:07.069 ==========

Re: SpectrumAnalyzer.sln build errors

Posted: Mon Mar 20, 2023 6:30 am
by Luc
I was able to track it down. It's due to C++ compliance changes of Visual Studio from version 2015 to the more recent ones.

Hopefully there is a quick fix!

Right click on the project and select Properties > C/C++ > Language and change "Conformance Mode" to "No (/permissive)". It should now compile.

Check also that you are compiling in Release and x64 mode. I don't know why it was set to Debug by default when loading the project.

Tell me if that works for you (here it does) :)

nb: I'm in the process of refactoring everything to make it Linux compatible but that takes a lot of time...

Re: SpectrumAnalyzer.sln build errors

Posted: Mon Mar 20, 2023 12:46 pm
by hartung
All better now!
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========