PDA

View Full Version : build mesage - NMAKE : fatal error U1073: don't know how to make 'C:\Program'



BigThrum
22nd July 2015, 23:15
Windows7/Qt5.4 and Creator IDE/compiling on VS2010

build message - NMAKE : fatal error U1073: don't know how to make 'C:\Program'

Although I am sure I am pointing to the the correct libraries in the pro file. I cannot get past this message.
Everything runs well in vs2010 using the QT5 addin but on the creator IDE nothing but this message.

Any suggestions would be appreciated.

mikag
22nd July 2015, 23:47
I'm taking a quick guess here. You've got a path containing a space (C:\Program Files...) somewhere that's not quoted in the generated makefiles.
All paths with space chars must be quoted ("") or parts of the build system might fail.

Easiest solution is to not have any paths with spaces in your project path. But if you want to find where it fails you need to dig down into the generated makefiles located in your build directory. Ctrl-5 in Qt Creator will take you to settings for your project and under Build Settings there you can see your current build directory.

Never had this problem myself with Qt but the first place to look would be your .pro file. Any paths there with spaces must be quoted.

BigThrum
23rd July 2015, 22:16
Thanks for your advice - I thought it might work. But after putting all the quotes (" ") in and confirming that they were all in the makefile and the debug makefile. Nothing - just the annoying...

NMAKE : fatal error U1073: don't know how to make 'C:\Program'.

So here I stay....

ChrisW67
23rd July 2015, 22:22
Look at the actual commands being executed by Nmake because the error is there. We cannot see those so we cannot tell you exactly what the issue is.

Also your sources and build directory should not be under that path as they may be for the examples. Windows rightly block writes there.

BigThrum
23rd July 2015, 23:05
Thanks everybody for taking the interest. But I 've got it all working by comparing notes with another example. So perhaps you could help me by explaining why

This works

LIBS +=$$quote(-LC:\Program Files\Basler\pylon 4\pylon\lib\Win32)\
-lPylonBase_MD_VC100\

and this does not

win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../../../../../.."/Program Files/Basler/pylon 4/pylon/lib/Win32/ -lPylonBase_MD_VC100"
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../../../../../.."/Program Files/Basler/pylon 4/pylon/lib/Win32/ -lPylonBase_MD_VC100d"

maybe my quotes where in the wrong place.

Thanks again everybody.

To ChrisW67
You wrote "Look at the actual commands being executed by Nmake.. " I am assuming you mean in the makefile?

ChrisW67
24th July 2015, 11:58
No, I meant the actual commands executed by Nmake when it processes the Makefile generated by qmake. Yes, the commands are ultimately in the Makefile, but looking at the actual command that failed removes the obscuring factor of the variable expansions etc. and may lead to the correct bit of the Makefile/PRO file faster. These should show in the Qt Creator Compiler Output tab.



LIBS += -L$$PWD/../../../../../../.."/Program Files/Basler/pylon 4/pylon/lib/Win32/ -lPylonBase_MD_VC100"

by the time qmake and nmake are done and a Windows command shell gets the command you probably end up with:


-L$$PWD/../../../../../../../Program
Files/Basler/pylon
4/pylon/lib/Win32/
-lPylonBase_MD_VC100

as 4 (not 2) arguments converted for the Microsoft linker.

I would be inclined to try:


LIBS += "-L$$PWD/../../../../../../../Program Files/Basler/pylon 4/pylon/lib/Win32/" -lPylonBase_MD_VC100
// or
LIBS += -L"$$PWD/../../../../../../../Program Files/Basler/pylon 4/pylon/lib/Win32/" -lPylonBase_MD_VC100

or an absolute path set only once (something like)


PYLON_HOME="C:/Program Files/Basler/pylon 4/pylon"
win32:CONFIG(release, debug|release): LIBS += -L"$$PYLON_HOME/lib/Win32" -lPylonBase_MD_VC100
else:win32:CONFIG(debug, debug|release): LIBS += -L"$$PYLON_HOME/lib/Win32" -lPylonBase_MD_VC100d

BigThrum
27th July 2015, 22:12
ChrisW67 - many thanks for the trouble you have taken in explaining what these commands mean. Greatly appreciated.