armory3d / armortools

3D Content Creation Tools
https://armorpaint.org
Other
3.3k stars 337 forks source link

Compilation failure on Windows 10 #1780

Closed ImSapphire closed 2 weeks ago

ImSapphire commented 3 weeks ago

ArmorPaint version:

74e08bd2528555bbb56b5a7cd8e98fd8919946a1

OS / GPU model: Windows 10 Version 21H2

Issue description: Windows D3D11 build fails with the errors below. Adding #include <kinc/graphics4/texture.h> at the top of armorcore/sources/backends/direct3d11/kinc/backend/graphics4/Direct3D11.c.h allows the build to succeed

1>C:/Users/Sapphire/armortools/armorcore/sources/backends/direct3d11/kinc/backend/graphics4/Direct3D11.c.h(1179,32): error : unknown type name 'kinc_g4_texture_t'; did you mean 'kinc_g4_texture_unit_t'?
1>..\..\armorcore\sources\kinc/graphics4/textureunit.h(17,3): note: 'kinc_g4_texture_unit_t' declared here
1>In file included from C:/Users/Sapphire/armortools/armorcore/sources/backends/direct3d11/kinc/backend/graphics4/d3d11unit.c:99:
1>C:/Users/Sapphire/armortools/armorcore/sources/backends/direct3d11/kinc/backend/graphics4/Direct3D11.c.h(1181,55): error : unknown type name 'kinc_g4_texture_t'; did you mean 'kinc_g4_texture_unit_t'?
1>..\..\armorcore\sources\kinc/graphics4/textureunit.h(17,3): note: 'kinc_g4_texture_unit_t' declared here
1>In file included from C:/Users/Sapphire/armortools/armorcore/sources/backends/direct3d11/kinc/backend/graphics4/d3d11unit.c:99:
1>C:/Users/Sapphire/armortools/armorcore/sources/backends/direct3d11/kinc/backend/graphics4/Direct3D11.c.h(1181,6): error : conflicting types for 'kinc_g4_set_texture'
1>..\..\armorcore\sources\kinc/graphics4/graphics.h(373,6): note: previous declaration is here
1>In file included from C:/Users/Sapphire/armortools/armorcore/sources/backends/direct3d11/kinc/backend/graphics4/d3d11unit.c:99:
1>C:/Users/Sapphire/armortools/armorcore/sources/backends/direct3d11/kinc/backend/graphics4/Direct3D11.c.h(1185,38): error : unknown type name 'kinc_g4_texture_t'; did you mean 'kinc_g4_texture_unit_t'?
1>..\..\armorcore\sources\kinc/graphics4/textureunit.h(17,3): note: 'kinc_g4_texture_unit_t' declared here
1>In file included from C:/Users/Sapphire/armortools/armorcore/sources/backends/direct3d11/kinc/backend/graphics4/d3d11unit.c:99:
1>C:/Users/Sapphire/armortools/armorcore/sources/backends/direct3d11/kinc/backend/graphics4/Direct3D11.c.h(1187,61): error : unknown type name 'kinc_g4_texture_t'; did you mean 'kinc_g4_texture_unit_t'?
1>..\..\armorcore\sources\kinc/graphics4/textureunit.h(17,3): note: 'kinc_g4_texture_unit_t' declared here
1>In file included from C:/Users/Sapphire/armortools/armorcore/sources/backends/direct3d11/kinc/backend/graphics4/d3d11unit.c:99:
1>C:/Users/Sapphire/armortools/armorcore/sources/backends/direct3d11/kinc/backend/graphics4/Direct3D11.c.h(1187,6): error : conflicting types for 'kinc_g4_set_image_texture'
1>In file included from C:/Users/Sapphire/armortools/armorcore/sources/backends/direct3d11/kinc/backend/graphics4/d3d11unit.c:106:
1>C:/Users/Sapphire/armortools/armorcore/sources/backends/direct3d11/kinc/backend/graphics4/texture.c.h(210,6): error : conflicting types for 'kinc_internal_texture_set'
1>C:/Users/Sapphire/armortools/armorcore/sources/backends/direct3d11/kinc/backend/graphics4/Direct3D11.c.h(1179,6): note: previous declaration is here
1>In file included from C:/Users/Sapphire/armortools/armorcore/sources/backends/direct3d11/kinc/backend/graphics4/d3d11unit.c:106:
1>C:/Users/Sapphire/armortools/armorcore/sources/backends/direct3d11/kinc/backend/graphics4/texture.c.h(233,6): error : conflicting types for 'kinc_internal_texture_set_image'
1>C:/Users/Sapphire/armortools/armorcore/sources/backends/direct3d11/kinc/backend/graphics4/Direct3D11.c.h(1185,6): note: previous declaration is here
1>Done building project "ArmorPaint.vcxproj" -- FAILED.
FusionKD commented 3 weeks ago

I'm on Windows and I tried to build from the instructions provided by the source code too, but trying to build the executable led to several errors that I didn't know how to or want to fix them. trying to add the header mentioned in that file helps clear the errors and completes the build, but trying to run the executable after building it crashes immediately and leaves a dump file.

hana-zander commented 2 weeks ago

I tried to compile it for windows too and and the .exe file just crashes. I also tried the V8 branch, which had error in typescript scripts and even after i fixed them myself, the programm still doesnt compile and has some problems with libraries not working. I kinda get the feeling that the source code, never actually gets tested on windows lol

luboslenco commented 2 weeks ago

Adding #include <kinc/graphics4/texture.h> at the top of armorcore/sources/backends/direct3d11/kinc/backend/graphics4/Direct3D11.c.h allows the build to succeed

Added at https://github.com/armory3d/armorcore/commit/b6117cab29aae6e1021604fd0d580b3ad66a5cac, thanks for report!

If you get the crash, please run in the debug mode from Visual Studio and post a stack trace, will try to investigate.