PDA

View Full Version : Nmake crashes with error U1077



screeck
14th June 2009, 01:12
Aargh.

After many many hours and energy drinks later I still can't get Qt 4.5.1 to build succesfully. I'm trying to build it on windows using Visual Studio 2008. I have installed DirectX and PlatformSdk.

I get the following error:


link /LIBPATH:"c:\Qt\4.5.1\lib" /LIBPATH:"c:\Qt\4.5.1\lib" /NOLOGO /INCR
EMENTAL:NO /LTCG /DLL /MANIFEST /MANIFESTFILE:"tmp\obj\release_shared\qjpeg.inte
rmediate.manifest" /VERSION:4.51 /OUT:..\..\..\..\plugins\imageformats\qjpeg4.dl
l @C:\Users\Admin\AppData\Local\Temp\nm7BA9.tmp
LINK : fatal error LNK1104: cannot open file '..\..\..\..\plugins\imageformats\q
jpeg4.dll'
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN
\link.EXE"' : return code '0x450'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 9.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.

Used configuration line:


configure -no-sql-sqlite -no-qt3support -platform win32-msvc2008 -no-libtiff -no-dbus -no-phonon -no-phonon-backend -no-webkit

Also run before config:
c:\Program Files\Microsoft DirectX SDK (March 2009)\Utilities\bin\dx_setenv.cmd
c:\Program Files\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat


Any ideas how to fix this?

I also noticed that even bundled demos+tools won't run anymore. For example designer gives error "the beginning of the procedure ?allocateNode@QHashData@@QAEPAXXZ wasn't found from QtCore4.dll" (freely translated from Finnish). It did run perfectly well before. Apparently unsuccesfull compilation breaks everything...

jpn
14th June 2009, 11:57
LINK : fatal error LNK1104: cannot open file '..\..\..\..\plugins\imageformats\qjpeg4.dll'

Looks like the file might be in use so it cannot be overwritten.



I also noticed that even bundled demos+tools won't run anymore. For example designer gives error "the beginning of the procedure ?allocateNode@QHashData@@QAEPAXXZ wasn't found from QtCore4.dll" (freely translated from Finnish). It did run perfectly well before. Apparently unsuccesfull compilation breaks everything...
You have an older version of Qt in PATH. Use Dependency Walker (http://dependencywalker.com/) to see where it attempts to load the libraries from. A Qt application compiled with Qt 4.4 can be run against Qt 4.5, but not vice versa.

screeck
14th June 2009, 12:44
Looks like the file might be in use so it cannot be overwritten.

Yep, that was the problem and I even figured it out on my own after a well-slept night :)



You have an older version of Qt in PATH. Use Dependency Walker (http://dependencywalker.com/) to see where it attempts to load the libraries from. A Qt application compiled with Qt 4.4 can be run against Qt 4.5, but not vice versa.

Now it gets interesting. I have no previous Qt installed on my comp. Dependency walker says that I am missing 'IESHIMS.dll", even though by fast googling I found that is should be installed on every computer. Qt paths seem correct.

I made a copy of original install of Qt, and for example Designer run from there works like a charm. But when I try to run it from folder which was compiled using MSVC, I get the previously mentioned error.

God I miss Linux as a development platform.

jpn
14th June 2009, 13:06
Did you hit F9 to see full paths of loaded DLLs? Where does it load QtCore4.dll from? It could have been some application that installed Qt DLLs to the system directories or is listed in PATH before your compiled Qt.

screeck
14th June 2009, 13:37
Yep, I did. The libs come from "E:\oma\libs\Qt-4.5.1\bin", and ""E:\oma\libs\Qt-4.5.1\" is the Qt directory. Weirdest thing is that Designer run from "E:\oma\libs\Qt-4.5.1-mingw\" works and it is using Qt-DLLS from "E:\oma\libs\Qt-4.5.1\bin", but when I run Designer from that dir, I get an error.

None of the demos/examples work when run from "E:\oma\libs\Qt-4.5.1\...", but they work fine when run from "E:\oma\libs\Qt-4.5.1-mingw\...".

EDIT: Btw, that IESHIMS.DLL seems to be a problem with any file I open. I'm not sure if it affects DW in any way. So it's not QT-spesific.

EDIT2: I got demos working by changing the directory in PATH to " "E:\oma\libs\Qt-4.5.1\lib". Now I can run demos, but not the programs in directory bin. Bin has it's own versions of DLL's, were these compiled by MingW? Because I think this erros is because DLL's were compiled using different compilers. Demos that I ran were compiled by MSVC, and since I changed PATH point to lib\ where MSVC compiled libraries are, they work. Now I get the same error as before when I try to run MingW compiled demos, so I think libraries mitchmatch.

EDIT3: I removed all the DLL's from the bin directory, and everything seems to work now. DLL's are read from lib\, which has all the newest versions of DLL's compiled by MSVC. Is this normal behaviour or should I submit this as a bug?

lobster
13th July 2009, 21:25
thx alot for solution!!! I wouldn't solve it tonight by myself as well!!

BTW it will happend when u r nmaking and Qt Assistatnt is running. So close all Qt applications before nmake!