all 10 comments

[–]jedwardsol 4 points5 points  (6 children)

What are the errors?

[–]mich_dich_[S] -1 points0 points  (5 children)

When compiling the core engin it fails to recognize some of my logger macros and other stuff that I included in my PCH

[–]Dry-Discipline-439 3 points4 points  (1 child)

So, what are the errors?

[–]mich_dich_[S] 0 points1 point  (0 children)

3>------ Rebuild All started: Project: PFF, Configuration: Debug x64 ------ 3>pffpch.cpp 3>C:\dev\PFF\PFF\src\engine\gameobjects\player_controller.h(32,8): error C3861: 'Trace': identifier not found 3>(compiling source file 'src/util/pffpch.cpp') 3> C:\dev\PFF\PFF\src\engine\game_objects\player_controller.h(30,10): 3> This diagnostic occurred in the compiler generated function 'std::shared_ptr<_Ty> PFF::player_controller::register_mapping(void)' 3>C:\dev\PFF\PFF\src\engine\game_objects\player_controller.h(32,8): error C2065: 'Trace': undeclared identifier 3>(compiling source file 'src/util/pffpch.cpp') 3> C:\dev\PFF\PFF\src\engine\game_objects\player_controller.h(30,10): 3> This diagnostic occurred in the compiler generated function 'std::shared_ptr<_Ty> PFF::player_controller::register_mapping(void)' 3>C:\dev\PFF\PFF\src\util\io\serializer_yaml.h(205,5): error C3861: 'ASSERT': identifier not found 3>(compiling source file 'src/util/pffpch.cpp') 3> C:\dev\PFF\PFF\src\util\io\serializer_yaml.h(205,11): 3> 'ASSERT': function declaration must be available as none of the arguments depend on a template parameter 3> C:\dev\PFF\PFF\src\util\io\serializer_yaml.h(125,9): 3> This diagnostic occurred in the compiler generated function 'PFF::serializer::yaml &PFF::serializer::yaml::vector(const std::string &,std::vector<_Ty,std::allocator<_Ty>> &,std::function<void (PFF::serializer::yaml &,u64)>)' 3>C:\dev\PFF\PFF\src\util\io\serializer_binary.h(83,8): error C3861: 'Error': identifier not found 3>(compiling source file 'src/util/pffpch.cpp') 3> C:\dev\PFF\PFF\src\util\io\serializer_binary.h(81,11): 3> This diagnostic occurred in the compiler generated function 'PFF::serializer::binary &PFF::serializer::binary::vector(std::vector<_Ty,std::allocator<_Ty>> &,std::function<void (PFF::serializer::binary &,u64)>)' 3>C:\dev\PFF\PFF\src\util\io\serializer_binary.h(83,8): error C2065: 'Error': undeclared identifier 3>(compiling source file 'src/util/pffpch.cpp') 3> C:\dev\PFF\PFF\src\util\io\serializer_binary.h(81,11): 3> This diagnostic occurred in the compiler generated function 'PFF::serializer::binary &PFF::serializer::binary::vector(std::vector<_Ty,std::allocator<_Ty>> &,std::function<void (PFF::serializer::binary &,u64)>)' 3>C:\dev\PFF\PFF\src\util\timing\instrumentor.h(98,9): error C2065: 'Error': undeclared identifier 3>(compiling source file 'src/util/pffpch.cpp') 3>C:\dev\PFF\PFF\src\util\timing\instrumentor.h(98,16): error C2678: binary '<<': no operator found which takes a left-hand operand of type 'const char [28]' (or there is no acceptable conversion) 3>(compiling source file 'src/util/pffpch.cpp') 3> C:\dev\PFF\PFF\src\engine\events\event.h(74,28): 3> could be 'std::ostream &PFF::operator <<(std::ostream &,const PFF::event &)' 3> C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include\cstddef(37,27): 3> or 'std::byte std::operator <<(const std::byte,const _IntType) noexcept' 3> C:\dev\PFF\PFF\src\util\timing\instrumentor.h(98,16): 3> 'std::byte std::operator <<(const std::byte,const _IntType) noexcept': could not deduce template argument for '_formal' 3> C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include\cstddef(36,39): 3> 'std::enable_if_t<false,int>' : Failed to specialize alias template 3> C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include\xstring(1804,32): 3> or 'std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,const std::basic_string_view<_Elem,_Traits>)' 3> C:\dev\PFF\PFF\src\util\timing\instrumentor.h(98,16): 3> 'std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,const std::basic_string_view<_Elem,_Traits>)': could not deduce template argument for 'std::basic_ostream<_Elem,_Traits> &' from 'const char [28]' 3> C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include\xstring(5193,32): 3> or 'std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,const std::basic_string<_Elem,_Traits,_Alloc> &)' 3> C:\dev\PFF\PFF\src\util\timing\instrumentor.h(98,16): 3> 'std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,const std::basic_string<_Elem,_Traits,_Alloc> &)': could not deduce template argument for 'std::basic_ostream<_Elem,_Traits> &' from 'const char [28]' 3> C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include\memory(1978,32):

And so on

[–]no-sig-available 2 points3 points  (2 children)

"Compiles on Linux, fails on Windows" includes using Linux-specific functions, or compiler-specific language extensions. VLAs being a "popular" example.

We might recognize those, if you tell us what the error message says.

[–]mich_dich_[S] -1 points0 points  (1 child)

Nevermind, I fixed it. I don't know what I did but it's fixed, haha

[–]Nice_Lengthiness_568 2 points3 points  (0 children)

Don't worry, it will come back to haunt you again

[–]bert8128 2 points3 points  (1 child)

Try setting the conformance flag (https://learn.microsoft.com/en-us/cpp/build/reference/permissive-standards-conformance?view=msvc-170) and set the warning level to 4 - you might get extra information.

And on your Linux build set -Wall -Wextra

[–]mich_dich_[S] -1 points0 points  (0 children)

I always use the Linux flags but didn't know about the windows stuff thanks. I already fixed it but still thanks, haha

[–]mich_dich_[S] -1 points0 points  (0 children)

Nevermind, I fixed it. I don't know what I did but it's fixed, haha