Pedro
Pedro

Reputation: 4160

Error when compiling Qt: nmake fatal error U1077

I am trying to compile Qt 4.7.4, but I always get this error:

mt.exe: general error c101008d: Failed to write the updated manifest to the resource of file "release\tutorial5.exe". The system cannot find the file specified. 
NMAKE : fatal error U1077: '"C:\Program Files(x86)\Microsoft SDKs\Windows\v7.0A\bin\mt.exe"' : return code '0x1f'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files(x86)\Microsoft Visual Studio 10.0\VC\BIN\nmake.exe"' : return code '0x2'
Stop. 
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop. 
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.

Using the Visual Studio Command prompt I executed these commands:

configure -debug-and-release -opensource -platform win32-msvc2010
nmake

What can I do to resolve this error?

Upvotes: 9

Views: 14971

Answers (3)

phyatt
phyatt

Reputation: 19102

So apparently tutorial5.exe is failing to build properly, or completely, and the exe never gets created. Mt.exe is a windows post-build tool used for generating signed files and catalogs. It returns an error because it can't find the file.

The solution to your issue involves excluding the demos and tutorials from your build, or finding the bug in the source code for tutorial 5 so that it builds properly. Or you could even put a dummy version of tutorial5.exe there just to see if that is the only error that comes up.

Chances are that the bug in the source code has something to do with the difference between the default compiler tool for Qt in Windows (MingW) and the msvs2010 compiler and the way they are trying to handle some windows specific code.

How to Exclude the Examples When Building Qt

Other people online with similar projects have excluded the examples from the nmake build call using the flag "sub-src".

What is tutorial5.exe

Here is the location in the default build of Qt for release/tutorial5.exe:

C:\QtSDK\Examples\4.7\qtestlib\tutorial5

and here it is in the documentation: Qt 4.8: Chapter 5: Writing a Benchmark

You probably should submit a ticket describing the problem to the Qt project: bugreports.qt.io

Good luck.

Upvotes: 3

zamani
zamani

Reputation: 11

Try running the Microsoft visual studio command prompt as admin. When you go to the charm panel and search for MSVS prompt, right click and run as admin.

Upvotes: 1

handle
handle

Reputation: 6299

Similar error with a Qt console application with Qt 4.8.1, Creator 2.7.1, MSVC2010 Express on Windows 7 64 bit:

"mt.exe : general error c101008d: Failed to write the updated manifest to the resource of file ... " 

And then something along

The process cannot access the file because it is being used by another process.

However, the application is built and then can be "Run" from within Creator. The error also occurs with "Build" i.e. not "Run". I initally thought this might be a timing problem, e.g. creator is starting the shell to run the program too soon. It works allright (no error) after the file has been deleted.

Maybe my GIT (or TortoiseGIT) is accessing the file although I cannot see those processes.

Edit: it could also be a virus scanner checking the file being written.. Edit2: confirmed: temporarily disabling the scanner resolves the problem

Upvotes: 1

Related Questions