Kode / Kha

Ultra-portable, high performance, open source multimedia framework.
http://kha.tech
zlib License
1.49k stars 174 forks source link

Compiling hxcpp projects stopped working on Windows (even for empty example) #1346

Closed MoritzBrueckner closed 3 years ago

MoritzBrueckner commented 3 years ago

Describe the bug When compiling an arbitrary Kha/hxcpp project in Visual Studio 2019 on Windows, the compilation fails. This is even the case for the empty sample project. The last time I compiled to hxcpp was some while ago so I unfortunately can't tell when it worked before.

To Reproduce Steps to reproduce the behavior:

  1. Clone the empty sample project
  2. Run Kha/make windows
  3. Open the generated .sln file
  4. A bunch of errors occur:
    • for (almost?) every .cpp file: [...]\Empty\build\windows-build\Sources\src\Main.cpp(2,10): fatal error C1083: Datei (Vorkompilierte Headerdatei) kann nicht geöffnet werden: "x64\Debug\Empty.pch": No such file or directory (the German part means Could not open file (precompiled header file)
    • also, if I open one of the .cpp files from the errors above: Could not open the file "Source": "hxcpp.h" (translated; in regards to #include <hxcpp.h>)

Execution Environment:

RobDangerous commented 3 years ago

Can not reproduce the problem. GitHub CI is also looking good.

MoritzBrueckner commented 3 years ago

Looks like this issue has solved itself, I temporarily checked out the latest Kinc master and it works again, even after returning to the version from 3 days ago that didn't work above (which is the current one for the Kinc submodule in this repository). Maybe Git messed with some files locally. I hope I didn't waste too much of your time, thanks a lot for giving it a try!

jrdoughty commented 2 years ago

This issue seems to have repeated. I'm having it, and my buddy is as well. We're working on the EchoSystem https://github.com/jrdoughty/EchoSystem, but I did make a blank kha project using the init from the vs code extention to the same effect.

RobDangerous commented 2 years ago

I have absolutely no idea.

jrdoughty commented 2 years ago

Could it be related to the version of kha in that comes with the extention?

jrdoughty commented 2 years ago

I won't be able to test until tonight (another 8 hrs or so)

RobDangerous commented 2 years ago

Unlikely - still, you should really only use the integrated version for your first test-runs, it's almost always way behind and unsupported.

jrdoughty commented 2 years ago

ok, I'll work to get on the latest and greatest and see if this resolves

jrdoughty commented 2 years ago

That resolved kha building to Windows. I've got other issues now, but that'll be something I try to work through and create a different issue for. It'd be great if the extensions could get another update. Especially krom. I know that's not a painless process though.

RobDangerous commented 2 years ago

The Kha extension gets semi-regular updates which are actually painless but even when it's updated you really shouldn't use it's internal Kha - you can't version it. It is absolutely only intended as a starting point. Treat it like a demo mode. Krom is totally different story, the problem is not the extension, Krom itself needs some work.