|
|
|
|
D:\Programs\Visual Studio 2022\VC\Tools\MSVC\14.41.34120\include |
Error C2011 'std::nothrow_t': 'struct' type redefinition D:\Programs\Visual Studio 2022\VC\Tools\MSVC\14.41.34120\include\vcruntime_new.h Error C2011 'std::align_val_t': 'unsigned enum' type redefinition D:\Programs\Visual Studio 2022\VC\Tools\MSVC\14.41.34120\include\vcruntime_new.h Error C2084 function 'void *operator new(size_t,void *) noexcept' already has a body D:\Programs\Visual Studio 2022\VC\Tools\MSVC\14.41.34120\include\vcruntime_new.h Error C3615 constexpr function 'operator new' cannot result in a constant expression D:\Programs\Visual Studio 2022\VC\Tools\MSVC\14.41.34120\include\vcruntime_new.h Error C2953 'std::integral_constant': class template has already been defined D:\Programs\Visual Studio 2022\VC\Tools\MSVC\14.41.34120\include\xtr1common Error C2955 'std::integral_constant': use of class template requires template argument list D:\Programs\Visual Studio 2022\VC\Tools\MSVC\14.41.34120\include\xtr1common Error C2386 'bool_constant': a symbol with this name already exists in the current scope D:\Programs\Visual Studio 2022\VC\Tools\MSVC\14.41.34120\include\xtr1common Warning C4348 'std::enable_if': redefinition of default parameter: parameter 2 D:\Programs\Visual Studio 2022\VC\Tools\MSVC\14.41.34120\include\xtr1common Error C2953 'std::enable_if': class template has already been defined D:\Programs\Visual Studio 2022\VC\Tools\MSVC\14.41.34120\include\xtr1common Error C3855 'std::enable_if': template parameter '_Ty' is incompatible with the declaration '_Test' D:\Programs\Visual Studio 2022\VC\Tools\MSVC\14.41.34120\include\xtr1common Error C2976 'std::enable_if': too few template arguments D:\Programs\Visual Studio 2022\VC\Tools\MSVC\14.41.34120\include\xtr1common Error C2386 'enable_if_t': a symbol with this name already exists in the current scope D:\Programs\Visual Studio 2022\VC\Tools\MSVC\14.41.34120\include\xtr1common Error C2953 'std::conditional': class template has already been defined D:\Programs\Visual Studio 2022\VC\Tools\MSVC\14.41.34120\include\xtr1common Error C3855 'std::conditional': template parameter '_Ty1' is incompatible with the declaration '_Test' D:\Programs\Visual Studio 2022\VC\Tools\MSVC\14.41.34120\include\xtr1common Error C2976 'std::conditional': too few template arguments D:\Programs\Visual Studio 2022\VC\Tools\MSVC\14.41.34120\include\xtr1common Error C2386 'conditional_t': a symbol with this name already exists in the current scope D:\Programs\Visual Studio 2022\VC\Tools\MSVC\14.41.34120\include\xtr1common Error C2953 'std::is_same': class template has already been defined D:\Programs\Visual Studio 2022\VC\Tools\MSVC\14.41.34120\include\xtr1common Error C2953 'std::remove_const': class template has already been defined D:\Programs\Visual Studio 2022\VC\Tools\MSVC\14.41.34120\include\xtr1common Error C2953 'std::remove_const': class template has already been defined D:\Programs\Visual Studio 2022\VC\Tools\MSVC\14.41.34120\include\xtr1common Error C2386 'remove_const_t': a symbol with this name already exists in the current scope D:\Programs\Visual Studio 2022\VC\Tools\MSVC\14.41.34120\include\xtr1common Error C2953 'std::remove_cv': class template has already been defined D:\Programs\Visual Studio 2022\VC\Tools\MSVC\14.41.34120\include\xtr1common Error C2953 'std::remove_cv': class template has already been defined D:\Programs\Visual Studio 2022\VC\Tools\MSVC\14.41.34120\include\xtr1common Error C2953 'std::remove_cv': class template has already been defined D:\Programs\Visual Studio 2022\VC\Tools\MSVC\14.41.34120\include\xtr1common Error C2953 'std::remove_cv': class template has already been defined D:\Programs\Visual Studio 2022\VC\Tools\MSVC\14.41.34120\include\xtr1common Error C2386 'remove_cv_t': a symbol with this name already exists in the current scope D:\Programs\Visual Studio 2022\VC\Tools\MSVC\14.41.34120\include\xtr1common Error C2953 'std::_Disjunction': class template has already been defined D:\Programs\Visual Studio 2022\VC\Tools\MSVC\14.41.34120\include\xtr1common Error C3855 'std::_Disjunction': template parameter '_False' is incompatible with the declaration '_First_value' D:\Programs\Visual Studio 2022\VC\Tools\MSVC\14.41.34120\include\xtr1common Error C2953 'std::disjunction<_First,_Rest...>': class template has already been defined D:\Programs\Visual Studio 2022\VC\Tools\MSVC\14.41.34120\include\xtr1common Error C2084 function 'bool std::is_constant_evaluated(void) noexcept' already has a body D:\Programs\Visual Studio 2022\VC\Tools\MSVC\14.41.34120\include\xtr1common Error C3615 constexpr function 'std::is_constant_evaluated' cannot result in a constant expression D:\Programs\Visual Studio 2022\VC\Tools\MSVC\14.41.34120\include\xtr1common Error C1116 unrecoverable error importing module 'std.filesystem'. Specialization of 'std::bool_constant' with arguments 'std::is_integral_v<_Ty>' D:\Programs\Visual Studio 2022\VC\Tools\MSVC\14.41.34120\include\xtr1common Error C2011 'std::_Uninitialized': 'enum' type redefinition D:\Programs\Visual Studio 2022\VC\Tools\MSVC\14.41.34120\include\yvals.h |
except for the WxApp class which generates 31 errors of the types "type redefinition |
if I had to guess, you may be somehow mixing 32 and 64 bit libraries, and/or because of that, possibly including 2 copies. But this is just a guess, I am still trying to run it down with what you have given... |
Those are compilation errors, not linker errors. I think that there is a .cpp file being #included somewhere. |
Which compilation unit (usually a compiled .cpp file) is not building correctly? |
Do any of the .hpp include files have #include for std files that are already imported by import std.core? |
a bug with their module support |
std::unique_ptr;
since I was struggling with adding #include <memory>
and additional "duplicate definition" errors. Apparently memory.h is include in std.core. Most notably, I've removed references to <Windows.h> and <winver.h>.std::unique_ptr<Log,std::default_delete<Log>>::unique_ptr(const std::unique_ptr<Log,std::default_delete<Log>> &)': attempting to reference a deleted function |
|
|
|
|
unique_ptr
. Consider dereferencing the pointer and returning Log&
instead.
Log::Log no overloaded function could convert all the argument types |
import std.core;
in WxApp.cpp.
import std.core;
and the other experimental import library variants were a wasted attempt by MS to do what C++23 did later with import std;
and import std.compat;
.import std.core;
. Use what C++23 offers for module consumption instead. import std;
and import std.compat;
. Nor any of the other bastardization import ideas from MS. They are non-standard, C++23 provides all you need without the overhead of using the experimental libraries project setting. Ignore what MS says here:#include <cstdio>
.#include <Windows.h>
in WxApp.hpp, I create 50 errors, the majority consisting of C2995 "...function template has already been defined", in 5 files - none of them mine - but including stdlib.h and string.h.#include <Windows.h>
in the entire project and nothing related to string.h or stdlib.h.What import/include are in the .hpp files? |
#include <Windows.h>
above all the import statements, i.e.:
|
|
#pragam once
and header guards should behave in this way.
|
|
|
|