SpectrumAnalyzer.sln build errors

Everything that concerns the open-source Raman spectrometer
Post Reply
hartung
Posts: 5
Joined: Sun Mar 19, 2023 9:22 pm

SpectrumAnalyzer.sln build errors

Post 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 ==========
User avatar
Luc
Site Admin
Posts: 130
Joined: Fri Mar 17, 2023 9:18 am
Contact:

Re: SpectrumAnalyzer.sln build errors

Post 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...
hartung
Posts: 5
Joined: Sun Mar 19, 2023 9:22 pm

Re: SpectrumAnalyzer.sln build errors

Post by hartung »

All better now!
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
Post Reply