I have found many posts about this error but I could find how to overcome it.
This is the code where the error is triggered:
void main(){
float f{1.3};
}
Why in the initialize-list no casting happened like any other variable? For example, this works smoothly:
float f = 1.3;
asked Nov 9, 2015 at 9:05
Humam HelfawiHumam Helfawi
19.4k14 gold badges80 silver badges159 bronze badges
14
You’ve commented that the use of 1.3
gives an error with your compiler. That means you’ve found a compiler bug. The standard is quite clear that this is not a narrowing conversion, so it should be allowed.
Quoting N4140 (roughly C++14):
8.5.4 List-initialization [dcl.init.list]
7 A narrowing conversion is an implicit conversion
[…]
— (7.2) from
long double
todouble
orfloat
, or fromdouble
tofloat
, except where the source is a constant expression and the actual value after conversion is within the range of values that can be represented
(even if it cannot be represented exactly), or[…]
Your 1.3
is a constant expression well within the range of float
.
I recommend reporting this to Microsoft, assuming it isn’t a known issue already. Unfortunately, simply upgrading your Visual Studio won’t fix this. I can reproduce the problem in VS2015.
answered Nov 9, 2015 at 9:50
1
Forcing it to be float using the ‘f’ suffix avoids the narrowing conversion. the below works ..
float f{1.3f}
But i agree that the compiler should have taken care of it .. (as per the standard quoted by @hvd)
answered Dec 20, 2017 at 19:43
Since it is C++, don’t use c-style casts, try:
static_cast<float>(std::abs(...))
answered Nov 9, 2015 at 9:08
CJCombrinkCJCombrink
3,6861 gold badge22 silver badges38 bronze badges
3
This is maybe a bug or something. Use this instead:
float f;
f=1.3;
Donald Duck
8,25922 gold badges74 silver badges97 bronze badges
answered Mar 11, 2017 at 15:13
1
description | title | ms.date | f1_keywords | helpviewer_keywords | ms.assetid | ||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Learn more about: Compiler errors C2300 Through C2399 |
Compiler errors C2300 Through C2399 |
04/21/2019 |
|
|
07ca45b5-b2f0-4049-837b-40a7a3caed88 |
Compiler errors C2300 Through C2399
The articles in this section of the documentation explain a subset of the error messages that are generated by the compiler.
[!INCLUDEerror-boilerplate]
Error messages
Error | Message |
---|---|
Compiler error C2300 | ‘class‘: class does not have a destructor called ‘~class‘ |
Compiler error C2301 | left of ‘->~identifier‘ must point to class/struct/union |
Compiler error C2302 | left of ‘.~identifier‘ must have class/struct/union type |
Compiler error C2303 | Structured exception handling cannot be used in a coroutine |
Compiler error C2304 | ‘keyword‘ cannot be used inside of a catch block |
Compiler error C2305 | ‘file‘ does not contain debugging information for this module |
Compiler error C2306 | ‘file‘ does not contain the most recent debugging information for this module |
Compiler error C2307 | pragma directive must be moved outside of the function if incremental compilation is enabled |
Compiler error C2308 | concatenating mismatched strings |
Compiler error C2309 | catch handler expected a parenthesized exception declaration |
Compiler error C2310 | catch handlers must specify one type |
Compiler error C2311 | ‘type‘: is caught by ‘…’ on line number |
Compiler error C2312 | ‘type1‘: is caught by ‘type2‘ on line number |
Compiler error C2313 | ‘type1‘: is caught by reference (‘type2‘) on line number |
Compiler error C2314 | keyword ‘keyword1‘ is deprecated: use ‘keyword2‘ instead |
Compiler error C2315 | ‘type1‘: reference is caught by ‘type2‘ on line number |
Compiler error C2316 | ‘type‘: cannot be caught as the destructor and/or copy constructor are inaccessible or deleted |
Compiler error C2317 | ‘try’ block starting on line ‘number‘ has no catch handlers |
Compiler error C2318 | no try block associated with this catch handler |
Compiler error C2319 | ‘try/catch’ must be followed by a compound statement. Missing ‘{‘ |
Compiler error C2320 | expected ‘:’ to follow access specifier ‘specifier‘ |
Compiler error C2321 | ‘identifier‘ is a keyword, and cannot be used in this context |
Compiler error C2322 | ‘identifier‘: address of dllimport ‘identifier‘ is not static |
Compiler error C2323 | ‘identifier‘: non-member operator new or delete functions may not be declared static or in a namespace other than the global namespace |
Compiler error C2324 | ‘identifier‘: unexpected to the right of ‘::~’ |
Compiler error C2325 | ‘type1‘: unexpected type to the right of ‘->~’: expected ‘type2‘ |
Compiler error C2326 | ‘declarator‘: function cannot access ‘identifier‘ |
Compiler error C2327 | ‘identifier‘: is not a type name, static, or enumerator |
Compiler error C2328 | ‘keyword‘: keyword is not yet supported |
Compiler error C2329 | ‘identifier‘: __ptr64 not available for pointers to functions |
Compiler error C2330 | ‘implementation_key( )’ is only valid in a region bounded by #pragma start_map_region/stop_map_region |
Compiler error C2331 | access to ‘identifier‘ now defined to be ‘accessibility1‘, previously it was defined to be ‘accessibility2‘ |
Compiler error C2332 | ‘typedef‘: missing tag name |
Compiler error C2333 | ‘function‘: error in function declaration; skipping function body |
Compiler error C2334 | unexpected token(s) preceding ‘token‘; skipping apparent function body |
Compiler error C2335 | ‘identifier‘: a type cannot be introduced in a function parameter list |
Compiler error C2336 | ‘type‘: illegal type |
Compiler error C2337 | ‘attribute‘: attribute not found |
Compiler error C2338 | (error message from external provider) |
Compiler error C2339 | ‘identifier‘: illegal type in embedded-IDL |
Compiler error C2340 | ‘identifier‘: ‘static’ can only be used within a class definition |
Compiler error C2341 | ‘section‘: segment must be defined using #pragma data_seg, code_seg or section prior to use |
Compiler error C2342 | syntax error: conflicting type qualifiers |
Compiler error C2343 | ‘section‘: conflicting section attributes |
Compiler error C2344 | align(number): alignment must be power of two |
Compiler error C2345 | align(number): illegal alignment value |
Compiler error C2346 | ‘function‘ cannot be compiled as native: ‘explanation‘ |
Compiler error C2347 | Obsolete. |
Compiler error C2348 | ‘type‘: is not a C-style aggregate, cannot be exported in embedded-IDL |
Compiler error C2349 | ‘function‘ cannot be compiled as managed: ‘explanation‘; use #pragma unmanaged |
Compiler error C2350 | ‘identifier‘ is not a static member |
Compiler error C2351 | obsolete C++ constructor initialization syntax |
Compiler error C2352 | ‘identifier‘: illegal call of non-static member function |
Compiler error C2353 | exception specification is not allowed |
Compiler error C2354 | Obsolete. |
Compiler error C2355 | ‘this’: can only be referenced inside non-static member functions or non-static data member initializers |
Compiler error C2356 | initialization segment must not change during translation unit |
Compiler error C2357 | ‘identifier‘: must be a function of type ‘type‘ |
Compiler error C2358 | ‘identifier‘: a static property cannot be defined outside of a class definition |
Compiler error C2359 | Obsolete. |
Compiler error C2360 | initialization of ‘identifier‘ is skipped by ‘case’ label |
Compiler error C2361 | initialization of ‘identifier‘ is skipped by ‘default’ label |
Compiler error C2362 | initialization of ‘identifier‘ is skipped by ‘goto label‘ |
Compiler error C2363 | compiler intrinsic numeric limit function requires a string literal argument |
Compiler error C2364 | ‘type‘: illegal type for custom attribute |
Compiler error C2365 | ‘member1‘: redefinition; previous definition was ‘member2‘ |
Compiler error C2366 | ‘identifier‘: redefinition; different implementation_key specifiers |
Compiler error C2367 | Obsolete. |
Compiler error C2368 | ‘identifier‘: redefinition; different allocation specifiers |
Compiler error C2369 | ‘identifier‘: redefinition; different subscripts |
Compiler error C2370 | ‘identifier‘: redefinition; different storage class |
Compiler error C2371 | ‘identifier‘: redefinition; different basic types |
Compiler error C2372 | ‘identifier‘: redefinition; different types of indirection |
Compiler error C2373 | ‘identifier‘: redefinition; different type modifiers |
Compiler error C2374 | ‘identifier‘: redefinition; multiple initialization |
Compiler error C2375 | ‘identifier‘: redefinition; different linkage |
Compiler error C2376 | ‘identifier‘: redefinition; different based allocation |
Compiler error C2377 | ‘identifier‘: redefinition; typedef cannot be overloaded with any other symbol |
Compiler error C2378 | ‘identifier‘: redefinition; symbol cannot be overloaded with a typedef |
Compiler error C2379 | formal parameter number has different type when promoted |
Compiler error C2380 | type(s) preceding ‘identifier‘ (constructor with return type, or illegal redefinition of current class-name?) |
Compiler error C2381 | ‘identifier‘: redefinition; ‘__declspec(noreturn)’ or ‘[[noreturn]]’ differs |
Compiler error C2382 | ‘identifier‘: redefinition; different exception specifications |
Compiler error C2383 | ‘identifier‘: default-arguments are not allowed on this symbol |
Compiler error C2384 | ‘member‘: cannot apply thread_local or __declspec(thread) to a member of a managed/WinRT class |
Compiler error C2385 | ambiguous access of ‘member‘ |
Compiler error C2386 | ‘identifier‘: a symbol with this name already exists in the current scope |
Compiler error C2387 | ‘identifier‘: ambiguous base class |
Compiler error C2388 | ‘identifier‘: a symbol cannot be declared with both __declspec(appdomain) and __declspec(process) |
Compiler error C2389 | ‘operator‘: illegal operand ‘nullptr’ |
Compiler error C2390 | ‘identifier‘: incorrect storage class ‘specifier‘ |
Compiler error C2391 | ‘identifier‘: ‘friend’ cannot be used during type definition |
Compiler error C2392 | ‘member1‘: covariant returns types are not supported in managed/WinRT types, otherwise ‘member2‘ would be overridden |
Compiler error C2393 | ‘symbol‘: per-appdomain symbol cannot be allocated in segment ‘segment‘ |
Compiler error C2394 | ‘type::operator operator‘: CLR/WinRT operator not valid. At least one parameter must be of the following types: ‘T^’, ‘T^%’, ‘T^&’, where T = ‘type‘ |
Compiler error C2395 | ‘type::operator operator‘: CLR/WinRT operator not valid. At least one parameter must be of the following types: ‘T’, ‘T%’, ‘T&’, ‘T^’, ‘T^%’, ‘T^&’, where T = ‘type‘ |
Compiler error C2396 | ‘type1::operator type2‘: CLR/WinRT user-defined conversion function not valid. Must either convert from or convert to: ‘T^’, ‘T^%’, ‘T^&’, where T = ‘type1‘ |
Compiler error C2397 | conversion from ‘type1‘ to ‘type2‘ requires a narrowing conversion |
Compiler error C2398 | Element ‘number‘: conversion from ‘type1‘ to ‘type2‘ requires a narrowing conversion |
Compiler error C2399 | Obsolete. |
See also
C/C++ Compiler and build tools errors and warnings
Compiler errors C2000 — C3999, C7000 — C7999
hello!Thanks for the great project!
I’m having a problem configuring the project environment.
——————————————————————————>
C:Program Files (x86)Microsoft Visual Studio2019CommunityVCToolsMSVC14.29.30133includestdint.h(21): note:See declaration of «int64_t»
wisp/csrcopshashgrid_interpolate.cpp(49): error C2398: element ‘2’: conversion from ‘unsigned __int64’ to ‘_Ty’ requires a narrowing conversion
with
[
_Ty=int64_t
]
error: command ‘C:Program Files (x86)Microsoft Visual Studio2019CommunityVCToolsMSVC14.29.30133binHostX86x64cl .exe’ failed with exit status 2
above!
////////////////////////////////////////////////////////////////////////////////////
above!
my environment is:
windows11
python=3.8
pytorch=1.11.0
cuda=11.3
gpu=NVIDIA GeForce GTX 1650
I followed the README.md instructions exactly and installed steps 1-6 successfully. Error in step 7.
can you tell me what to do?
I still get errors using https://github.com/3a1b2c3/kaolin-wisp-Windows. What I’m trying to say is that once I run ‘python setup.py develop’ I get the same error, either https://github.com/NVIDIAGameWorks/kaolin or https://github.com/3a1b2c3/kaolin-wisp -Windows.
Is there any workaround?
Here is what went wrong:
===================================================================》》》》》》》》》
D:downloadsanacondaenvswisplibsite-packagestorchincludec10/util/Optional.h(540): note: see instantiation of the alias template being compiled «c10::OptionalBase» reference
D:downloadsanacondaenvswisplibsite-packagestorchincludec10/core/impl/InlineStreamGuard.h(232): note: see instantiation of the class template being compiled «c10::optional» » reference
with
[
T=c10::impl::VirtualGuardImpl
]
D:downloadsanacondaenvswisplibsite-packagestorchincludec10/core/StreamGuard.h(162): note: see instantiation of the class template being compiled «c10::impl:: Reference to InlineMultiStreamGuardc10::impl::VirtualGuardImpl»
D:downloadsanacondaenvswisplibsite-packagestorchincludec10/util/Optional.h(432): warning C4624: «c10::trivially_copyable_optimization_optional_base»: destructor already Implicitly defined as «deleted»
with
[
T=c10::impl::VirtualGuardImpl
]
D:downloadsanacondaenvswisplibsite-packagestorchincludec10/util/Optional.h(198): warning C4624: «c10::constexpr_storage_t»: destructor already Implicitly defined as «deleted»
with
[
T=std::vector<c10::ivalue::Future::WeakStorage,std::allocatorc10::ivalue::Future::WeakStorage>
]
D:downloadsanacondaenvswisplibsite-packagestorchincludec10/util/Optional.h(397): note: see instantiation of the class template being compiled «c10::constexpr_storage_t» reference
with
[
T=std::vector<c10::ivalue::Future::WeakStorage,std::allocatorc10::ivalue::Future::WeakStorage>
]
D:downloadsanacondaenvswisplibsite-packagestorchincludec10/util/Optional.h(540): note: see instantiation of the class template being compiled «c10::trivially_copyable_optimization_optional_base» reference
with
[
T=std::vector<c10::ivalue::Future::WeakStorage,std::allocatorc10::ivalue::Future::WeakStorage>
]
D:downloadsanacondaenvswisplibsite-packagestorchincludec10/util/Optional.h(540): note: see instantiation of the alias template being compiled «c10::OptionalBase<std ::vector<c10::ivalue::Future::WeakStorage, std::allocatorc10::ivalue::Future::WeakStorage>>»
D:downloadsanacondaenvswisplibsite-packagestorchincludeATen/core/ivalue_inl.h(834): note: see instantiation of the class template being compiled «c10::optional<std ::vector<c10::ivalue::Future::WeakStorage, std::allocatorc10::ivalue::Future::WeakStorage>>»
D:downloadsanacondaenvswisplibsite-packagestorchincludec10/util/Optional.h(432): warning C4624: «c10::trivially_copyable_optimization_optional_base»: destructor already Implicitly defined as «deleted»
with
[
T=std::vector<c10::ivalue::Future::WeakStorage,std::allocatorc10::ivalue::Future::WeakStorage>
]
Continuing the question above:
C:Program FilesNVIDIA GPU Computing ToolkitCUDAv11.3binnvcc.exe -c wisp/csrcexternalmesh2sdf_kernel.cu -o buildtemp.win-amd64-3.8Releasewisp/csrc externalmesh2sdf_kernel.obj -ID:downloadsanacondaenvswisplibsite-packagestorchinclude -ID:downloadsanacondaenvswisplibsite-packagestorchincludetorch csrcapiinclude -ID:downloadsanacondaenvswisplibsite-packagestorchincludeTH -ID:downloadsanacondaenvswisplibsite-packagestorchinclude THC «-IC:Program FilesNVIDIA GPU Computing ToolkitCUDAv11.3include» -ID:downloadsanacondaenvswispinclude -ID:downloadsanacondaenvswispinclude » -IC:Program Files (x86)Microsoft Visual Studio2019CommunityVCToolsMSVC14.29.30133ATLMFCinclude» «-IC:Program Files (x86)Microsoft Visual Studio2019Community VCToolsMSVC14.29.30133include» «-IC:Program Files (x86)Windows Kits10include10.0.19041.0ucrt» «-IC:Program Files (x86)Windows Kits 10include10.0.19041.0shared» «-IC:Program Files (x86)Windows Kits10include10.0.19041.0um» «-IC:Program Files (x86)Windows Kits10include10.0.19041.0winrt» «-IC:Program Files (x86 )Windows Kits10include10.0.19041.0cppwinrt» -Xcudafe —diag_suppress=dll_interface_conflict_dllexport_assumed -Xcudafe —diag_suppress=dll_interface_conflict_none_assumed -Xcudafe —diag_suppress=field_without_dll_interface -Xcudafe —diag_dll_suppress=base_interface_compiler /compiler wd4190 -Xcompiler /wd4018 -Xcompiler /wd4275 -Xcompiler /wd4267 -Xcompiler /wd4244 -Xcompiler /wd4251 -Xcompiler /wd4819 -Xcompiler /MD -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ —expt-relaxed-constexpr -O3 -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME =_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 —use-local-env
error: command ‘C:Program FilesNVIDIA GPU Computing ToolkitCUDAv11.3binnvcc.exe’ failed with exit status 1
#NVIDIAGameWorks/kaolin#482
When I «pip install ninja», the above error is no longer reported, and everything is back on track. The problem encountered after that is very similar to the one described in this link. I can’t compile all the .obj’s. I believe if I’m on ubuntu maybe I can configure it successfully, but I only want to use it on windows. Is there any solution?
Hi @zh-en520 , can you post the full logs? I can’t see the FAIL from what you provided. Have you been able to build Kaolin on your system?
@Caenorst thank you for reading.
No, I can`t build Kaolin and build Kaolin-wisp.
Build Kaolin error::———————->>>>>>>>>>>>>>>>>>>>
(wisp) D:nvkaolin-wisp-Windows-main1kaolin>python setup.py develop
Warning: passing language=’c++’ to cythonize() is deprecated. Instead, put «# distutils: language=c++» in your .pyx or .pxd file(s)
running develop
D:downloadsanacondaenvswisplibsite-packagessetuptoolscommandeasy_install.py:156: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
D:downloadsanacondaenvswisplibsite-packagessetuptoolscommandinstall.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running egg_info
writing kaolin.egg-infoPKG-INFO
writing dependency_links to kaolin.egg-infodependency_links.txt
writing requirements to kaolin.egg-inforequires.txt
writing top-level names to kaolin.egg-infotop_level.txt
reading manifest file ‘kaolin.egg-infoSOURCES.txt’
reading manifest template ‘MANIFEST.in’
adding license file ‘LICENSE’
writing manifest file ‘kaolin.egg-infoSOURCES.txt’
running build_ext
minimum_required_version= (19, 0, 24215)
compiler_info= b’xd3xc3xd3xda x64 xb5xc4 Microsoft (R) C/C++ xd3xc5xbbxafxb1xe0xd2xebxc6xf7 19.29.30146 xb0xe6rnxb0xe6xc8xa8xcbxf9xd3xd0(C) Microsoft Corporationxa1xa3xb1xa3xc1xf4xcbxf9xd3xd0xc8xa8xc0xfbxa1xa3rnrnxd3xc3xb7xa8: cl [ xd1xa1xcfxee… ] xcexc4xbcxfexc3xfb… [ /link xc1xb4xbdxd3xd1xa1xcfxee… ]rn’
version= [’19’, ’29’, ‘30146’]
building ‘kaolin._C’ extension
minimum_required_version= (19, 0, 24215)
compiler_info= b’xd3xc3xd3xda x64 xb5xc4 Microsoft (R) C/C++ xd3xc5xbbxafxb1xe0xd2xebxc6xf7 19.29.30146 xb0xe6rnxb0xe6xc8xa8xcbxf9xd3xd0(C) Microsoft Corporationxa1xa3xb1xa3xc1xf4xcbxf9xd3xd0xc8xa8xc0xfbxa1xa3rnrnxd3xc3xb7xa8: cl [ xd1xa1xcfxee… ] xcexc4xbcxfexc3xfb… [ /link xc1xb4xbdxd3xd1xa1xcfxee… ]rn’
version= [’19’, ’29’, ‘30146’]
Emitting ninja build file D:nvkaolin-wisp-Windows-main1kaolinbuildtemp.win-amd64-3.8Releasebuild.ninja…
Compiling objects…
Allowing ninja to set a default number of workers… (overridable by setting the environment variable MAX_JOBS=N)
1.10.2.git.kitware.jobserver-1
C:Program Files (x86)Microsoft Visual Studio2019CommunityVCToolsMSVC14.29.30133binHostX86x64link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:D:downloadsanacondaenvswisplibsite-packagestorchlib «/LIBPATH:C:Program FilesNVIDIA GPU Computing ToolkitCUDAv11.3lib/x64» /LIBPATH:D:downloadsanacondaenvswisplibs /LIBPATH:D:downloadsanacondaenvswispPCbuildamd64 «/LIBPATH:C:Program Files (x86)Microsoft Visual Studio2019CommunityVCToolsMSVC14.29.30133ATLMFClibx64» «/LIBPATH:C:Program Files (x86)Microsoft Visual Studio2019CommunityVCToolsMSVC14.29.30133libx64» «/LIBPATH:C:Program Files (x86)Windows Kits10lib10.0.19041.0ucrtx64» «/LIBPATH:C:Program Files (x86)Windows Kits10lib10.0.19041.0umx64» c10.lib torch.lib torch_cpu.lib torch_python.lib cudart_static.lib c10_cuda.lib torch_cuda_cu.lib torch_cuda_cpp.lib /EXPORT:PyInit__C D:nvkaolin-wisp-Windows-main1kaolinbuildtemp.win-amd64-3.8Releasekaolin/csrcbindings.obj D:nvkaolin-wisp-Windows-main1kaolinbuildtemp.win-amd64-3.8Releasekaolin/csrcmetricssided_distance.obj D:nvkaolin-wisp-Windows-main1kaolinbuildtemp.win-amd64-3.8Releasekaolin/csrcmetricsunbatched_triangle_distance.obj D:nvkaolin-wisp-Windows-main1kaolinbuildtemp.win-amd64-3.8Releasekaolin/csrcopspacked_simple_sum.obj D:nvkaolin-wisp-Windows-main1kaolinbuildtemp.win-amd64-3.8Releasekaolin/csrcopstile_to_packed.obj D:nvkaolin-wisp-Windows-main1kaolinbuildtemp.win-amd64-3.8Releasekaolin/csrcopsconversionsmesh_to_spcmesh_to_spc.obj D:nvkaolin-wisp-Windows-main1kaolinbuildtemp.win-amd64-3.8Releasekaolin/csrcopsconversionsunbatched_mcubeunbatched_mcube.obj D:nvkaolin-wisp-Windows-main1kaolinbuildtemp.win-amd64-3.8Releasekaolin/csrcopsmeshmesh_intersection.obj D:nvkaolin-wisp-Windows-main1kaolinbuildtemp.win-amd64-3.8Releasekaolin/csrcopsspcconvolution.obj D:nvkaolin-wisp-Windows-main1kaolinbuildtemp.win-amd64-3.8Releasekaolin/csrcopsspcfeature_grids.obj D:nvkaolin-wisp-Windows-main1kaolinbuildtemp.win-amd64-3.8Releasekaolin/csrcopsspcpoint_utils.obj D:nvkaolin-wisp-Windows-main1kaolinbuildtemp.win-amd64-3.8Releasekaolin/csrcopsspcquery.obj D:nvkaolin-wisp-Windows-main1kaolinbuildtemp.win-amd64-3.8Releasekaolin/csrcopsspcspc.obj D:nvkaolin-wisp-Windows-main1kaolinbuildtemp.win-amd64-3.8Releasekaolin/csrcrendermeshdeftet.obj D:nvkaolin-wisp-Windows-main1kaolinbuildtemp.win-amd64-3.8Releasekaolin/csrcrendermeshdibr_soft_mask.obj D:nvkaolin-wisp-Windows-main1kaolinbuildtemp.win-amd64-3.8Releasekaolin/csrcrendermeshrasterization.obj D:nvkaolin-wisp-Windows-main1kaolinbuildtemp.win-amd64-3.8Releasekaolin/csrcrenderspcraytrace.obj D:nvkaolin-wisp-Windows-main1kaolinbuildtemp.win-amd64-3.8Releasekaolin/csrcmetricssided_distance_cuda.obj D:nvkaolin-wisp-Windows-main1kaolinbuildtemp.win-amd64-3.8Releasekaolin/csrcmetricsunbatched_triangle_distance_cuda.obj D:nvkaolin-wisp-Windows-main1kaolinbuildtemp.win-amd64-3.8Releasekaolin/csrcopspacked_simple_sum_cuda.obj D:nvkaolin-wisp-Windows-main1kaolinbuildtemp.win-amd64-3.8Releasekaolin/csrcopstile_to_packed_cuda.obj D:nvkaolin-wisp-Windows-main1kaolinbuildtemp.win-amd64-3.8Releasekaolin/csrcopsconversionsmesh_to_spcmesh_to_spc_cuda.obj D:nvkaolin-wisp-Windows-main1kaolinbuildtemp.win-amd64-3.8Releasekaolin/csrcopsconversionsunbatched_mcubeunbatched_mcube_cuda.obj D:nvkaolin-wisp-Windows-main1kaolinbuildtemp.win-amd64-3.8Releasekaolin/csrcopsmeshmesh_intersection_cuda.obj D:nvkaolin-wisp-Windows-main1kaolinbuildtemp.win-amd64-3.8Releasekaolin/csrcopsspcconvolution_cuda.obj D:nvkaolin-wisp-Windows-main1kaolinbuildtemp.win-amd64-3.8Releasekaolin/csrcopsspcfeature_grids_cuda.obj D:nvkaolin-wisp-Windows-main1kaolinbuildtemp.win-amd64-3.8Releasekaolin/csrcopsspcgenerate_points.obj D:nvkaolin-wisp-Windows-main1kaolinbuildtemp.win-amd64-3.8Releasekaolin/csrcopsspcminkowski_conv.obj D:nvkaolin-wisp-Windows-main1kaolinbuildtemp.win-amd64-3.8Releasekaolin/csrcopsspcpoint_utils_cuda.obj D:nvkaolin-wisp-Windows-main1kaolinbuildtemp.win-amd64-3.8Releasekaolin/csrcopsspcquery_cuda.obj D:nvkaolin-wisp-Windows-main1kaolinbuildtemp.win-amd64-3.8Releasekaolin/csrcopsspcscan_octrees.obj D:nvkaolin-wisp-Windows-main1kaolinbuildtemp.win-amd64-3.8Releasekaolin/csrcrendermeshdeftet_cuda.obj D:nvkaolin-wisp-Windows-main1kaolinbuildtemp.win-amd64-3.8Releasekaolin/csrcrendermeshdibr_soft_mask_cuda.obj D:nvkaolin-wisp-Windows-main1kaolinbuildtemp.win-amd64-3.8Releasekaolin/csrcrendermeshrasterization_cuda.obj D:nvkaolin-wisp-Windows-main1kaolinbuildtemp.win-amd64-3.8Releasekaolin/csrcrenderspcraytrace_cuda.obj /OUT:buildlib.win-amd64-3.8kaolin_C.pyd /IMPLIB:D:nvkaolin-wisp-Windows-main1kaolinbuildtemp.win-amd64-3.8Releasekaolin/csrc_C.lib
LINK : fatal error LNK1181: cannot open input file:“D:nvkaolin-wisp-Windows-main1kaolinbuildtemp.win-amd64-3.8Releasekaolincsrcbindings.obj”
error: command ‘C:Program Files (x86)Microsoft Visual Studio2019CommunityVCToolsMSVC14.29.30133binHostX86x64link.exe’ failed with exit status 1181
(wisp) D:nvkaolin-wisp-Windows-main1kaolin>
I installed Kaolin by accident before, and now I can use Kaolin. But it fails to install again
(wisp) D:nvkaolin-wisp-Windows-main1>python -c «import kaolin; print(kaolin.version)»
0.12.0
(wisp) D:nvkaolin-wisp-Windows-main1>
The following is the result of running Kaolin-wisp:
(wisp) D:nvkaolin-wisp-Windows-main1>python setup.py develop
running develop
D:downloadsanacondaenvswisplibsite-packagessetuptoolscommandeasy_install.py:156: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
D:downloadsanacondaenvswisplibsite-packagessetuptoolscommandinstall.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running egg_info
writing wisp.egg-infoPKG-INFO
writing dependency_links to wisp.egg-infodependency_links.txt
writing top-level names to wisp.egg-infotop_level.txt
reading manifest file ‘wisp.egg-infoSOURCES.txt’
adding license file ‘LICENSE’
writing manifest file ‘wisp.egg-infoSOURCES.txt’
running build_ext
minimum_required_version= (19, 0, 24215)
compiler_info= b’xd3xc3xd3xda x64 xb5xc4 Microsoft (R) C/C++ xd3xc5xbbxafxb1xe0xd2xebxc6xf7 19.29.30146 xb0xe6rnxb0xe6xc8xa8xcbxf9xd3xd0(C) Microsoft Corporationxa1xa3xb1xa3xc1xf4xcbxf9xd3xd0xc8xa8xc0xfbxa1xa3rnrnxd3xc3xb7xa8: cl [ xd1xa1xcfxee… ] xcexc4xbcxfexc3xfb… [ /link xc1xb4xbdxd3xd1xa1xcfxee… ]rn’
version= [’19’, ’29’, ‘30146’]
building ‘wisp._C’ extension
minimum_required_version= (19, 0, 24215)
compiler_info= b’xd3xc3xd3xda x64 xb5xc4 Microsoft (R) C/C++ xd3xc5xbbxafxb1xe0xd2xebxc6xf7 19.29.30146 xb0xe6rnxb0xe6xc8xa8xcbxf9xd3xd0(C) Microsoft Corporationxa1xa3xb1xa3xc1xf4xcbxf9xd3xd0xc8xa8xc0xfbxa1xa3rnrnxd3xc3xb7xa8: cl [ xd1xa1xcfxee… ] xcexc4xbcxfexc3xfb… [ /link xc1xb4xbdxd3xd1xa1xcfxee… ]rn’
version= [’19’, ’29’, ‘30146’]
Emitting ninja build file D:nvkaolin-wisp-Windows-main1buildtemp.win-amd64-3.8Releasebuild.ninja…
Compiling objects…
Allowing ninja to set a default number of workers… (overridable by setting the environment variable MAX_JOBS=N)
1.10.2.git.kitware.jobserver-1
C:Program Files (x86)Microsoft Visual Studio2019CommunityVCToolsMSVC14.29.30133binHostX86x64link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:D:downloadsanacondaenvswisplibsite-packagestorchlib «/LIBPATH:C:Program FilesNVIDIA GPU Computing ToolkitCUDAv11.3lib/x64» /LIBPATH:D:downloadsanacondaenvswisplibs /LIBPATH:D:downloadsanacondaenvswispPCbuildamd64 «/LIBPATH:C:Program Files (x86)Microsoft Visual Studio2019CommunityVCToolsMSVC14.29.30133ATLMFClibx64» «/LIBPATH:C:Program Files (x86)Microsoft Visual Studio2019CommunityVCToolsMSVC14.29.30133libx64» «/LIBPATH:C:Program Files (x86)Windows Kits10lib10.0.19041.0ucrtx64» «/LIBPATH:C:Program Files (x86)Windows Kits10lib10.0.19041.0umx64» c10.lib torch.lib torch_cpu.lib torch_python.lib cudart_static.lib c10_cuda.lib torch_cuda_cu.lib torch_cuda_cpp.lib /EXPORT:PyInit__C D:nvkaolin-wisp-Windows-main1buildtemp.win-amd64-3.8Releasewisp/csrcbindings.obj D:nvkaolin-wisp-Windows-main1buildtemp.win-amd64-3.8Releasewisp/csrcexternalmesh_to_sdf.obj D:nvkaolin-wisp-Windows-main1buildtemp.win-amd64-3.8Releasewisp/csrcopshashgrid_interpolate.obj D:nvkaolin-wisp-Windows-main1buildtemp.win-amd64-3.8Releasewisp/csrcrenderfind_depth_bound.obj D:nvkaolin-wisp-Windows-main1buildtemp.win-amd64-3.8Releasewisp/csrcexternalmesh2sdf_kernel.obj D:nvkaolin-wisp-Windows-main1buildtemp.win-amd64-3.8Releasewisp/csrcopshashgrid_interpolate_cuda.obj D:nvkaolin-wisp-Windows-main1buildtemp.win-amd64-3.8Releasewisp/csrcrenderfind_depth_bound_cuda.obj /OUT:buildlib.win-amd64-3.8wisp_C.pyd /IMPLIB:D:nvkaolin-wisp-Windows-main1buildtemp.win-amd64-3.8Releasewisp/csrc_C.lib
LINK : fatal error LNK1181: 无法打开输入文件“D:nvkaolin-wisp-Windows-main1buildtemp.win-amd64-3.8Releasewispcsrcexternalmesh2sdf_kernel.obj”
error: command ‘C:Program Files (x86)Microsoft Visual Studio2019CommunityVCToolsMSVC14.29.30133binHostX86x64link.exe’ failed with exit status 1181
(wisp) D:nvkaolin-wisp-Windows-main1>python -c «import kaolin; print(kaolin.version)»
0.12.0
(wisp) D:nvkaolin-wisp-Windows-main1>
Ok let’s start with Kaolin first, do you mind opening a new issue on Kaolin repo for reference for other users?
Does this still fail with the new merged PR (#28)?
Closing this issue, feel free to reopen if needed
Вы отметили, что использование 1.3
приводит к ошибке с вашим компилятором. Это означает, что вы обнаружили ошибку компилятора. Стандарт совершенно ясен, что это не сужение конверсии, поэтому оно должно быть разрешено.
Цитата N4140 (примерно С++ 14):
8.5.4 List-initialization [dcl.init.list]
7 Сужение преобразования является неявным преобразованием
[…]
— (7.2) от
long double
доdouble
илиfloat
, или отdouble
доfloat
, , за исключением случаев, когда источником является постоянное выражение, а фактическое значение после преобразования находится внутри диапазон значений, которые могут быть представлены(даже если он не может быть представлен точно), или[…]
Ваш 1.3
является постоянным выражением в пределах диапазона float
.
Я рекомендую сообщить об этом Microsoft, предположив, что это уже не известная проблема. К сожалению, просто обновление вашей Visual Studio не устранит этого. Я могу воспроизвести проблему в VS2015.
I’m seeing a MIDL2398 error every time I try to compile a Visual C++ (Visual Studio 2010) project which uses COM. This project builds perfectly fine on my Windows 7 developer machine and on a Windows Server 2008 build machine, but not on a Windows Server 2012
build machine.
I found this web site about the various MIDL compiler errors:http://blog.yezhucn.com/midl/compiler_errors.htm (also
referenced yours: http://msdn.microsoft.com/en-us/library/aa367085%28VS.85%29.aspx)
But, I tried it’s suggestion for MIDL2398, I verified that «midlc.exe» was in the same directory as «midl.exe» and that both were the same version (both are file version: 7.0.555.1 product version: 6.1.7600.16385, from the Windows SDK v7.1).
I’m guessing it has something to do with Windows Server 2012, but I don’t know.
I’ve tried installing the Win8 SDK on the Win2012 server and VS2010 won’t even recognize its there. Attempted to get VS2010 to recognize Win8 SDK by following these instructions to no avail: http://blogs.msdn.com/b/vcblog/archive/2012/03/25/10287354.aspx
Has anyone been able to get the Windows SDK v7.1 (or SDK8) MIDL compiler to work on Windows Server 2012? Or, does anyone know of what else might be causing MIDL2398?