Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation error with MSVC #1

Open
mhaemmerle opened this issue Feb 4, 2021 · 1 comment
Open

Compilation error with MSVC #1

mhaemmerle opened this issue Feb 4, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@mhaemmerle
Copy link

When compiling obj2voxel I get the following error message. Any idea how to solve this?

..\obj2voxel\voxelio\include\voxelio\vec.hpp(53): error C2440: 'static_cast': cannot convert from '_Ty ' to 'T'
with
[
_Ty=tinyobj::real_t
]
and
[
T=float
]
..\obj2voxel\voxelio\include\voxelio\vec.hpp(53): note: There is no context in which this conversion is possible
......\main.cpp(114): note: see reference to function template instantiation 'voxelio::Vec<float,3>::Vec<_Ty
,0>(_Ty )' being compiled
with
[
_Ty=tinyobj::real_t
]
......\main.cpp(114): note: see reference to function template instantiation 'voxelio::Vec<float,3>::Vec<_Ty
,0>(_Ty *)' being compiled
with
[
_Ty=tinyobj::real_t
]

@Eisenwave Eisenwave added the bug Something isn't working label Feb 5, 2021
@Eisenwave
Copy link
Owner

I couldn't reproduce the bug, and it does seem very strange in the first place. Does this still happen with the latest version of obj2voxel and voxel-io?

tinyobj::real_t and float are the exact same type with the current configuration, so MSVC is basically saying it can't cast float to float.

In the meantime, obj2voxel releases now come with pre-compiled Linux and Windows executables, so you won't have to build from source anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants