PDA

View Full Version : VS add-in: _(QTDIR) instead of $(QTDIR)



negritot
28th April 2009, 00:09
I just installed Qt 4.5.1 and the VS add-in. In Visual Studio, when I go to Qt>Open Qt Project File, the add-in output looks like this:

--- (Import): Generating new project of tpsdkdialogsx_qt.pro file
...
--- (qmake) : Arguments: -spec $(QTDIR)\mkspecs\win32-msvc2005 -tp vc "tpsdkdialogsx_qt.pro" -o "tpsdkdialogsx_qt.vcproj" QMAKE_INCDIR_QT=$(QTDIR)\include QMAKE_LIBDIR_QT= QMAKE_LIBDIR=$(QTDIR)\lib QMAKE_UIC=_(QTDIR)\bin\uic.exe QMAKE_MOC=_(QTDIR)\bin\moc.exe QMAKE_RCC=_(QTDIR)\bin\rcc.exe QMAKE_QMAKE=$(QTDIR)\bin\qmake.exe

Notice the use of $(QTDIR) in some places and _(QTDIR) in others. When I build, I get an error like this:

1>'_' is not recognized as an internal or external command
If I open the vcproj file in a text editor and replace all instances of _(QTDIR) with $(QTDIR), the project builds as I expect.

Does any one know what's going wrong?

ComaWhite
28th April 2009, 02:38
You should file a bug report.

negritot
28th April 2009, 17:55
Reverting to the VS add-in 1.0RC has fixed the issue for now. I'll go ahead and file a bug.

huseyinkozan
9th May 2009, 20:56
I have experienced this problem too. After some try, I found a solution.

Open *.vcproj with text editor after openening the project from *.pro.
Find and replace all _(QTDIR) with $(QTDIR).

Now it works.
The bug added and fixed in 1.0.1 release but there is no downloadable file at that version.

Huseyin