sideeffects / HoudiniEngineForUnreal

Houdini Engine Plugin for Unreal Engine.
http://www.sidefx.com/unreal
Other
1.35k stars 373 forks source link

Compiling error: "... cannot convert double to float ..." when build from source with branch Houdini19.0-UE5.00 and Unreal Engine branch 5.0.0 #171

Closed WinRec closed 2 years ago

WinRec commented 2 years ago

UE5 source code is branch 5.0.0 from github, Houdini plugin is branch Houdini19.0-UE5.00. Followed instructions of Building from source (changed Houdini version to 19.0.561 in uplugin and Build.cs), compiling error as below: (Build tool are latest VS 2022 and latest Rider for Unreal)

HBSPOps.cpp(61): [C2678] binary '+=': no operator found which takes a left-hand operand of type 'FBox' (or there is no acceptable conversion) Box.h(162): [C2678] could be 'UE::Math::TBox &UE::Math::TBox::operator +=(const UE::Math::TBox &)' Box.h(143): [C2678] or 'UE::Math::TBox &UE::Math::TBox::operator +=(const UE::Math::TVector &)' FrameTime.h(193): [C2678] or 'FFrameTime &operator +=(FFrameTime &,FFrameTime)' StringBuilder.h(407): [C2678] or 'FStringBuilderBase &operator +=(FStringBuilderBase &,FUtf8StringView)' StringBuilder.h(406): [C2678] or 'FStringBuilderBase &operator +=(FStringBuilderBase &,FWideStringView)' StringBuilder.h(405): [C2678] or 'FStringBuilderBase &operator +=(FStringBuilderBase &,WIDECHAR)' StringBuilder.h(404): [C2678] or 'FStringBuilderBase &operator +=(FStringBuilderBase &,ANSICHAR)' GenericPlatform.h(118): [C2678] or 'FGenericPlatformTypes::UTF8CHAR &operator +=(FGenericPlatformTypes::UTF8CHAR &,FGenericPlatformTypes::UTF8CHAR)' HBSPOps.cpp(61): [C2678] while trying to match the argument list '(FBox, UE::Math::TVector)' HBSPOps.cpp(85): [C2678] binary '+=': no operator found which takes a left-hand operand of type 'FBox' (or there is no acceptable conversion) Box.h(162): [C2678] could be 'UE::Math::TBox &UE::Math::TBox::operator +=(const UE::Math::TBox &)' Box.h(143): [C2678] or 'UE::Math::TBox &UE::Math::TBox::operator +=(const UE::Math::TVector &)' FrameTime.h(193): [C2678] or 'FFrameTime &operator +=(FFrameTime &,FFrameTime)' StringBuilder.h(407): [C2678] or 'FStringBuilderBase &operator +=(FStringBuilderBase &,FUtf8StringView)' StringBuilder.h(406): [C2678] or 'FStringBuilderBase &operator +=(FStringBuilderBase &,FWideStringView)' StringBuilder.h(405): [C2678] or 'FStringBuilderBase &operator +=(FStringBuilderBase &,WIDECHAR)' StringBuilder.h(404): [C2678] or 'FStringBuilderBase &operator +=(FStringBuilderBase &,ANSICHAR)' GenericPlatform.h(118): [C2678] or 'FGenericPlatformTypes::UTF8CHAR &operator +=(FGenericPlatformTypes::UTF8CHAR &,FGenericPlatformTypes::UTF8CHAR)' HBSPOps.cpp(85): [C2678] while trying to match the argument list '(FBox, UE::Math::TVector)' HBSPOps.cpp(164): [C2440] 'initializing': cannot convert from 'UE::Math::TPlane' to 'UE::Math::TVector' HBSPOps.cpp(164): [C2440] Constructor for struct 'UE::Math::TVector' is declared 'explicit' HBSPOps.cpp(165): [C2440] 'initializing': cannot convert from 'FPlane4f' to 'UE::Math::TVector' HBSPOps.cpp(165): [C2440] Constructor for struct 'UE::Math::TVector' is declared 'explicit' HBSPOps.cpp(174): [C2679] binary '=': no operator found which takes a right-hand operand of type 'FVector' (or there is no acceptable conversion) Vector.h(1159): [C2679] could be 'UE::Math::TVector &UE::Math::TVector::operator =(UE::Math::TVector &&)' Vector.h(1159): [C2679] or 'UE::Math::TVector &UE::Math::TVector::operator =(const UE::Math::TVector &)' HBSPOps.cpp(174): [C2679] while trying to match the argument list '(FVector3f, FVector)' HBSPOps.cpp(175): [C2679] binary '=': no operator found which takes a right-hand operand of type 'FVector' (or there is no acceptable conversion) Vector.h(1159): [C2679] could be 'UE::Math::TVector &UE::Math::TVector::operator =(UE::Math::TVector &&)' Vector.h(1159): [C2679] or 'UE::Math::TVector &UE::Math::TVector::operator =(const UE::Math::TVector &)' HBSPOps.cpp(175): [C2679] while trying to match the argument list '(FVector3f, FVector)' HBSPOps.cpp(202): [C2440] 'initializing': cannot convert from 'UE::Math::TPlane' to 'UE::Math::TVector' HBSPOps.cpp(202): [C2440] Constructor for struct 'UE::Math::TVector' is declared 'explicit' HBSPOps.cpp(226): [C2664] 'int32 FPoly::SplitWithPlane(const FVector3f &,const FVector3f &,FPoly ,FPoly ,int32) const': cannot convert argument 1 from 'FVector' to 'const FVector3f &' HBSPOps.cpp(226): [C2664] Reason: cannot convert from 'FVector' to 'const FVector3f' HBSPOps.cpp(226): [C2664] No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called Polys.h(110): [C2664] see declaration of 'FPoly::SplitWithPlane' HBSPOps.cpp(372): [C2440] '': cannot convert from 'initializer list' to 'FPlane' HBSPOps.cpp(372): [C2440] No constructor could take the source type, or constructor overload resolution was ambiguous HBSPOps.cpp(708): [C2664] 'int TArray<UE::Math::TVector,FDefaultAllocator>::Add(UE::Math::TVector &&)': cannot convert argument 1 from 'FVector' to 'UE::Math::TVector &&' HBSPOps.cpp(708): [C2664] Reason: cannot convert from 'FVector' to 'UE::Math::TVector' HBSPOps.cpp(708): [C2664] No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called Array.h(2027): [C2664] see declaration of 'TArray<UE::Math::TVector,FDefaultAllocator>::Add' HBSPOps.cpp(714): [C2664] 'int32 AddThing(TArray<UE::Math::TVector,FDefaultAllocator> &,const FVector3f &,float,int32)': cannot convert argument 2 from 'FVector' to 'const FVector3f &' HBSPOps.cpp(720): [C2664] Reason: cannot convert from 'FVector' to 'const FVector3f' HBSPOps.cpp(717): [C2664] No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called HBSPOps.cpp(668): [C2664] see declaration of 'AddThing' HBSPOps.cpp(736): [C2664] 'int TArray<UE::Math::TVector,FDefaultAllocator>::Add(UE::Math::TVector &&)': cannot convert argument 1 from 'FVector' to 'UE::Math::TVector &&' HBSPOps.cpp(736): [C2664] Reason: cannot convert from 'FVector' to 'UE::Math::TVector' HBSPOps.cpp(736): [C2664] No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called Array.h(2027): [C2664] see declaration of 'TArray<UE::Math::TVector,FDefaultAllocator>::Add' HBSPOps.cpp(746): [C2664] 'float UModel::FindNearestVertex(const FVector3f &,FVector3f &,float,int32 &) const': cannot convert argument 1 from 'FVector' to 'const FVector3f &' HBSPOps.cpp(746): [C2664] Reason: cannot convert from 'FVector' to 'const FVector3f' HBSPOps.cpp(746): [C2664] No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called Model.h(549): [C2664] see declaration of 'UModel::FindNearestVertex' HBSPOps.cpp(755): [C2664] 'int32 AddThing(TArray<UE::Math::TVector,FDefaultAllocator> &,const FVector3f &,float,int32)': cannot convert argument 2 from 'FVector' to 'const FVector3f &' HBSPOps.cpp(755): [C2664] Reason: cannot convert from 'FVector' to 'const FVector3f' HBSPOps.cpp(755): [C2664] No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called HBSPOps.cpp(668): [C2664] see declaration of 'AddThing' HBSPOps.cpp(1010): [C2679] binary '=': no operator found which takes a right-hand operand of type 'FVector' (or there is no acceptable conversion) Vector.h(1159): [C2679] could be 'UE::Math::TVector &UE::Math::TVector::operator =(UE::Math::TVector &&)' Vector.h(1159): [C2679] or 'UE::Math::TVector &UE::Math::TVector::operator =(const UE::Math::TVector &)' HBSPOps.cpp(1010): [C2679] while trying to match the argument list '(FVector3f, FVector)' HBSPOps.cpp(1017): [C2679] binary '=': no operator found which takes a right-hand operand of type 'FVector' (or there is no acceptable conversion) Vector.h(1159): [C2679] could be 'UE::Math::TVector &UE::Math::TVector::operator =(UE::Math::TVector &&)' Vector.h(1159): [C2679] or 'UE::Math::TVector &UE::Math::TVector::operator =(const UE::Math::TVector &)' HBSPOps.cpp(1017): [C2679] while trying to match the argument list '(FVector3f, FVector)' HBSPOps.cpp(1024): [C2679] binary '=': no operator found which takes a right-hand operand of type 'FVector' (or there is no acceptable conversion) Vector.h(1159): [C2679] could be 'UE::Math::TVector &UE::Math::TVector::operator =(UE::Math::TVector &&)' Vector.h(1159): [C2679] or 'UE::Math::TVector &UE::Math::TVector::operator =(const UE::Math::TVector &)' HBSPOps.cpp(1024): [C2679] while trying to match the argument list '(FVector3f, FVector)' HBSPOps.cpp(1031): [C2679] binary '=': no operator found which takes a right-hand operand of type 'FVector' (or there is no acceptable conversion) Vector.h(1159): [C2679] could be 'UE::Math::TVector &UE::Math::TVector::operator =(UE::Math::TVector &&)' Vector.h(1159): [C2679] or 'UE::Math::TVector &UE::Math::TVector::operator =(const UE::Math::TVector &)' HBSPOps.cpp(1031): [C2679] while trying to match the argument list '(FVector3f, FVector)' HBSPOps.cpp(1038): [C2679] binary '=': no operator found which takes a right-hand operand of type 'FVector' (or there is no acceptable conversion) Vector.h(1159): [C2679] could be 'UE::Math::TVector &UE::Math::TVector::operator =(UE::Math::TVector &&)' Vector.h(1159): [C2679] or 'UE::Math::TVector &UE::Math::TVector::operator =(const UE::Math::TVector &)' HBSPOps.cpp(1038): [C2679] while trying to match the argument list '(FVector3f, FVector)' HBSPOps.cpp(1045): [C2679] binary '=': no operator found which takes a right-hand operand of type 'FVector' (or there is no acceptable conversion) Vector.h(1159): [C2679] could be 'UE::Math::TVector &UE::Math::TVector::operator =(UE::Math::TVector &&)' Vector.h(1159): [C2679] or 'UE::Math::TVector &UE::Math::TVector::operator =(const UE::Math::TVector &)' HBSPOps.cpp(1045): [C2679] while trying to match the argument list '(FVector3f, FVector)' HBSPOps.cpp(1088): [C2664] 'T UE::Math::TVector::PointPlaneDist(const UE::Math::TVector &,const UE::Math::TVector &,const UE::Math::TVector &)': cannot convert argument 1 from 'UE::Math::TVector' to 'const UE::Math::TVector &' HBSPOps.cpp(1088): [C2664] Reason: cannot convert from 'UE::Math::TVector' to 'const UE::Math::TVector' HBSPOps.cpp(1088): [C2664] No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called Vector.h(935): [C2664] see declaration of 'UE::Math::TVector::PointPlaneDist' HBSPOps.cpp(1139): [C2440] 'initializing': cannot convert from 'FVector3f' to 'UE::Math::TVector' HBSPOps.cpp(1139): [C2440] Constructor for struct 'UE::Math::TVector' is declared 'explicit' HBSPOps.cpp(1139): [C2440] 'initializing': cannot convert from 'FVector3f' to 'UE::Math::TVector' HBSPOps.cpp(1139): [C2440] Constructor for struct 'UE::Math::TVector' is declared 'explicit' HBSPOps.cpp(1139): [C2440] 'initializing': cannot convert from 'FVector3f' to 'UE::Math::TVector' HBSPOps.cpp(1139): [C2440] Constructor for struct 'UE::Math::TVector' is declared 'explicit' HBSPOps.cpp(1139): [C2440] 'initializing': cannot convert from 'FVector3f' to 'UE::Math::TVector' HBSPOps.cpp(1139): [C2440] Constructor for struct 'UE::Math::TVector' is declared 'explicit' HBSPOps.cpp(1274): [C2440] 'initializing': cannot convert from 'UE::Math::TVector' to 'UE::Math::TVector' HBSPOps.cpp(1274): [C2440] Constructor for struct 'UE::Math::TVector' is declared 'explicit' HBSPOps.cpp(1330): [C2678] binary '-': no operator found which takes a left-hand operand of type 'UE::Math::TVector' (or there is no acceptable conversion) Vector.h(283): [C2678] could be 'UE::Math::TVector UE::Math::TVector::operator -(const UE::Math::TVector &) const' FrameTime.h(226): [C2678] or 'FFrameTime operator -(FFrameTime,FFrameTime)' HBSPOps.cpp(1330): [C2678] while trying to match the argument list '(UE::Math::TVector, FVector)' HBSPOps.cpp(1332): [C2678] binary '-': no operator found which takes a left-hand operand of type 'FVector3f' (or there is no acceptable conversion) Vector.h(283): [C2678] could be 'UE::Math::TVector UE::Math::TVector::operator -(const UE::Math::TVector &) const' FrameTime.h(226): [C2678] or 'FFrameTime operator -(FFrameTime,FFrameTime)' HBSPOps.cpp(1332): [C2678] while trying to match the argument list '(FVector3f, FVector)' HBSPOps.cpp(1335): [C2664] 'UE::Math::TVector4 UE::Math::TMatrix::TransformVector(const UE::Math::TVector &) const': cannot convert argument 1 from 'FVector3f' to 'const UE::Math::TVector &' HBSPOps.cpp(1335): [C2664] Reason: cannot convert from 'FVector3f' to 'const UE::Math::TVector' HBSPOps.cpp(1335): [C2664] No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called Matrix.h(185): [C2664] see declaration of 'UE::Math::TMatrix::TransformVector' HBSPOps.cpp(1336): [C2664] 'UE::Math::TVector4 UE::Math::TMatrix::TransformVector(const UE::Math::TVector &) const': cannot convert argument 1 from 'FVector3f' to 'const UE::Math::TVector &' HBSPOps.cpp(1336): [C2664] Reason: cannot convert from 'FVector3f' to 'const UE::Math::TVector' HBSPOps.cpp(1336): [C2664] No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called Matrix.h(185): [C2664] see declaration of 'UE::Math::TMatrix::TransformVector' HBSPOps.cpp(1339): [C2679] binary '=': no operator found which takes a right-hand operand of type 'const UE::Math::TVector' (or there is no acceptable conversion) Vector.h(1159): [C2679] could be 'UE::Math::TVector &UE::Math::TVector::operator =(UE::Math::TVector &&)' Vector.h(1159): [C2679] or 'UE::Math::TVector &UE::Math::TVector::operator =(const UE::Math::TVector &)' HBSPOps.cpp(1339): [C2679] while trying to match the argument list '(FVector3f, const UE::Math::TVector)' ... ... ...

All error are caused by "can not convert float to double (double to float)" type of error. I built UE5 first, then copy HoudiniForUnreal into plugin/Runtime/HoudiniEngine and generated project file and built the plugin. I tried ue5-main branch, same errors.

JetBrainsLog.ReSharperBuild_2022_03_22_12_13_37_7437.log

WinRec commented 2 years ago

Someone mentioned a temporarily fix: https://github.com/sideeffects/HoudiniEngineForUnreal/issues/156#issuecomment-1063603084

CBhoudini commented 2 years ago

Just hit this today too.

dpernuit commented 2 years ago

Those errors were expected, as, at the time, the 5.00 plugin code was still made for preview 2.

These were fixed by https://github.com/sideeffects/HoudiniEngineForUnreal/commit/b9c56dd4c3a79594b025cb2532a60f3de1c38f95