geode-sdk/cli

Problem with building the project

ScarletRedMan opened this issue · 2 comments

I created project with command geode new and I can't built it.

For build project I using commands:

cmake -B build -T host=x64 -A win32
cmake --build build --config Release

log:

C:\Users\andrentev\CLionProjects\PaperDragon>cmake -B build -T host=x64 -A win32 
-- Building for: Visual Studio 17 2022
-- The C compiler identification is MSVC 19.34.31933.0
-- The CXX compiler identification is MSVC 19.34.31933.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x86/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x86/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Geode: C:\Users\andrentev\GeodeSDK
-- Found Geode CLI: C:/Users/andrentev/geode/geode.exe (version 1.1.1)
-- Module support is disabled.
-- Version: 8.1.1
-- Build type: 
-- CXX_STANDARD: 20
-- Performing Test has_std_20_flag
-- Performing Test has_std_20_flag - Failed
-- Performing Test has_std_2a_flag
-- Performing Test has_std_2a_flag - Failed
-- Performing Test SUPPORTS_USER_DEFINED_LITERALS
-- Performing Test SUPPORTS_USER_DEFINED_LITERALS - Success
-- Performing Test FMT_HAS_VARIANT
-- Performing Test FMT_HAS_VARIANT - Success
-- Required features: cxx_variadic_templates
-- Looking for _strtod_l
-- Looking for _strtod_l - found
-- Creating geode file for PaperDragon
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/andrentev/CLionProjects/PaperDragon/build

C:\Users\andrentev\CLionProjects\PaperDragon>cmake --build build --config Release 
MSBuild version 17.4.0+18d5aef85 for .NET Framework
  Checking Build System
  fmt.vcxproj -> C:\Users\andrentev\GeodeSDK\build\fmt\Release\fmt.lib
  Building Custom Rule C:/Users/andrentev/CLionProjects/PaperDragon/CMakeLists.txt
  cmake_pch.cxx
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\include\format(2311,19): error C2039: "_isnan": ­Ґ пў«пҐвбп з«Ґ­®¬ "std". [C:\Users\andrentev\CLionProjects\PaperDragon\build\PaperDragon.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\include\format(71,1): message : б¬. ®Ўкпў«Ґ­ЁҐ "std" [C:\Users\andrentev\CLionProjects\PaperDragon\build\PaperDragon.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\include\format(2276,22): message : ‘®®ЎйҐ­ЁҐ ¤Ё Ј­®бвЁЄЁ ў®§­ЁЄ«® ў ᮧ¤ ­­®© Є®¬ЇЁ«пв®а®¬ дг­ЄжЁЁ "_OutputIt std::_Fmt_write(_OutputIt,_Arithmetic)" [C:\Users\andrentev\CLionProjects\PaperDragon\build\PaperDragon.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\include\format(2795,15): error C2039: "_isnan": ­Ґ пў«пҐвбп з«Ґ­®¬ "std". [C:\Users\andrentev\CLionProjects\PaperDragon\build\PaperDragon.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\include\format(71,1): message : б¬. ®Ўкпў«Ґ­ЁҐ "std" [C:\Users\andrentev\CLionProjects\PaperDragon\build\PaperDragon.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\include\format(2550,22): message : ‘®®ЎйҐ­ЁҐ ¤Ё Ј­®бвЁЄЁ ў®§­ЁЄ«® ў ᮧ¤ ­­®© Є®¬ЇЁ«пв®а®¬ дг­ЄжЁЁ "_OutputIt std::_Fmt_write(_OutputIt,_Float,const std::_Basic_format_specs<_CharT> &,std::_Lazy_locale)" [C:\Users\andrentev\CLionProjects\PaperDragon\build\PaperDragon.vcxproj]

error:

error C2039: _isnan: is not a member of std

I had the same issue recently - my "fix" was to comment the line #define isnan _isnan in (geode sdk path)\Geode\loader\include\Geode\cocos\platform\win32\CCStdC.h:

image-1

This is probably more a hack than a fix but it worked for me

Yes, it works. But I hope it won't break anything. Thanks