Qt project failing compilation with no discernible error
-
@Karlovsky120
This is my guess.jom: C:\Source\build-project-qt-Desktop_Qt_5_12_9_MSVC2017_64bit-Debug\src\Makefile.Debug [debug\editor.exe] Error 1 jom: C:\Source\build-project-qt-Desktop_Qt_5_12_9_MSVC2017_64bit-Debug\src\Makefile [debug] Error 2 jom: C:\Source\build-project-qt-Desktop_Qt_5_12_9_MSVC2017_64bit-Debug\Makefile [sub-src-make_first] Error 2
This is the part of the Makefile.debug file which seems to invoke the editor.exe:
It is not trying to "invoke"
editor.exe
. It is trying to open/create it for writing to, for generating the final executable from the link command line.I think you will find that those
Error
numbers are just the value of the constants in<errno.h>
.Value
2
isENOENT
, No such file or directory. I don't know whether they are supposed to exist, but I think it's telling youdebug
andsub-src-make_first
do not. These might be a consequence of the other error.......Value
1
isEPERM
, “Operation not permitted.” Only the owner of the file (or other resource) or processes with special privileges can perform the operation. This is the first error and I think the interesting one.I think this is telling you it is unable to open
debug\editor.exe
for write. I would concentrate on this. Under Windows you can get this error number for a variety of reasons (not just what the text above says).- Does that file exist, can you delete it?
- If, for example, you have previously set off running
editor.exe
and it has not exited properly you may get this message. - Could there be a permission problem? You should be able to delete the whole of the
debug
folder and rebuild from scratch, which might sort it out?
-
Well, sub-src-make_first is mentioned in the Makefile in the root directory:
sub-src-make_first: sub-lib-cocos2d-make_first FORCE @if not exist src\ mkdir src\ & if not exist src\ exit 1 @set MAKEFLAGS=$(MAKEFLAGS) cd src\ && ( if not exist Makefile $(QMAKE) -o Makefile C:\Source\project\src\src.pro -spec win32-clang-msvc "CONFIG+=debug" "CONFIG+=qml_debug" "CONFIG+=qtquickcompiler" "CONFIG+=force_debug_info" "CONFIG+=separate_debug_info" "DEFINES+=_WIN32 _WINDOWS CC_STATIC BT_NO_SIMD_OPERATOR_OVERLOADS _WINSOCKAPI_ Z_SOLO" ) && $(MAKE) -f Makefile
debug/editor.exe doesn't exist at all, I think that is the output that the project needs to produce. I've completely deleted the output folder many times, there can't be write permission issues with windows when it so readily writes the rest of the files, unless it somehow can't specifically write *.exe files.
The mentioned editor.exe.10472.84781.jom file also doesn't exist on that (or any other) path.
-
@Karlovsky120 said in Qt project failing compilation with no discernible error:
editor.exe.10472.84781.jom
That will just be a temporary file, created & removed by the make process.
/OUT:debug\editor.exe @C:\Users\User\AppData\Local\Temp\editor.exe.10472.84781.jom
Let's be absolutely clear: does the path
C:\Users\User\AppData\Local\Temp
exist (and you can create files there) or not?@if not exist src\ mkdir src\ & if not exist src\ exit 1
That looks like the potential
Error 1
then. Whatever directory that runs in (I don't know, so don't ask me) is there a directory namedsrc
/can it create one there? Just for example, if there were a file there namedsrc
this would fall over. -
Yeah, the temp folder exists and I can create file no problem. I even played a game (for the first time, after I tried compiling this) last night, I can see it created files there as well too.
-
@Karlovsky120
I just edited previous to ask about themkdir src\
line? -
What about that line? It seems to create src folder if it doesn't exist and crash if it can't. But it creates the folder just fine, this is where Makefile and Makefile.Debug are, along with a few others.
-
@Karlovsky120 said in Qt project failing compilation with no discernible error:
What about that line?
I picked that out because of the
exit 1
and your first error message'sError 1
. There may be other occurrences ofexit 1
.Since I don't do this stuff I will leave it to others to try to help.
-
I don't think that line is the issue. Thank you for you time anyway. :)
-
LIBAPP is unset for this particular project, although it works perfectly fine for it's dependency. Solution that I found is to just add it to the system environment in the build settings. I hate everything.