Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Fail to build qt 5.2.1 static on windows 7 using tdm-gcc
Forum Updated to NodeBB v4.3 + New Features

Fail to build qt 5.2.1 static on windows 7 using tdm-gcc

Scheduled Pinned Locked Moved Installation and Deployment
3 Posts 3 Posters 2.3k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dr3mro
    wrote on 12 Mar 2014, 11:20 last edited by
    #1

    hello
    i fail to build qt on w7 and i get this error
    building using qtsdk gcc goes fine

    @
    qml\qqmlengine.cpp: In function 'QString shellNormalizeFileName(const QString&)':
    qml\qqmlengine.cpp:2299:5: error: 'PIDLIST_ABSOLUTE' was not declared in this scope
    PIDLIST_ABSOLUTE file;
    ^
    qml\qqmlengine.cpp:2299:22: error: expected ';' before 'file'
    PIDLIST_ABSOLUTE file;
    ^
    In file included from c:\qt\tdm-gcc\include\winnt.h:34:0,
    from c:\qt\tdm-gcc\include\windef.h:253,
    from c:\qt\tdm-gcc\include\windows.h:48,
    from C:\Qt\Qt5.2.1\Static\src\qt-everywhere-opensource-src-5.2.1\qtbase\include\QtCore/../../src/coreli
    b/global/qt_windows.h:71,
    from C:\Qt\Qt5.2.1\Static\src\qt-everywhere-opensource-src-5.2.1\qtbase\include\QtCore/qt_windows.h:1,
    from C:\Qt\Qt5.2.1\Static\src\qt-everywhere-opensource-src-5.2.1\qtbase\mkspecs\win32-g++/qplatformdefs
    .h:63,
    from C:\Qt\Qt5.2.1\Static\src\qt-everywhere-opensource-src-5.2.1\qtbase\include\QtCore\5.2.1\QtCore/pri
    vate/../../../../../src/corelib/thread/qthread_p.h:57,
    from C:\Qt\Qt5.2.1\Static\src\qt-everywhere-opensource-src-5.2.1\qtbase\include\QtCore\5.2.1\QtCore/pri
    vate/qthread_p.h:1,
    from qml\qqmlengine.cpp:83:
    qml\qqmlengine.cpp:2300:49: error: 'file' was not declared in this scope
    if (FAILED(SHParseDisplayName(nameC, NULL, &file, 0, NULL)))
    ^
    qml\qqmlengine.cpp:2303:30: error: 'file' was not declared in this scope
    if (!SHGetPathFromIDList(file, buffer))
    ^
    Makefile.Release:30581: recipe for target '.obj/release/qqmlengine.o' failed
    mingw32-make[4]: *** [.obj/release/qqmlengine.o] Error 1
    mingw32-make[4]: Leaving directory 'C:/Qt/Qt5.2.1/Static/src/qt-everywhere-opensource-src-5.2.1/qtdeclarative/src/qml'
    Makefile:34: recipe for target 'release' failed
    mingw32-make[3]: *** [release] Error 2
    mingw32-make[3]: Leaving directory 'C:/Qt/Qt5.2.1/Static/src/qt-everywhere-opensource-src-5.2.1/qtdeclarative/src/qml'
    Makefile:44: recipe for target 'sub-qml-make_first-ordered' failed
    mingw32-make[2]: *** [sub-qml-make_first-ordered] Error 2
    mingw32-make[2]: Leaving directory 'C:/Qt/Qt5.2.1/Static/src/qt-everywhere-opensource-src-5.2.1/qtdeclarative/src'
    Makefile:41: recipe for target 'sub-src-make_first' failed
    mingw32-make[1]: *** [sub-src-make_first] Error 2
    mingw32-make[1]: Leaving directory 'C:/Qt/Qt5.2.1/Static/src/qt-everywhere-opensource-src-5.2.1/qtdeclarative'
    Makefile:212: recipe for target 'module-qtdeclarative-make_first' failed
    mingw32-make: *** [module-qtdeclarative-make_first] Error 2
    @

    http://pastebin.com/d0jp2Pwa

    1 Reply Last reply
    0
    • N Offline
      N Offline
      NibiruXIV
      wrote on 23 Mar 2014, 11:12 last edited by
      #2

      I have same error! I try to build Qt 5.2.1 for a whole week, buy every time have this error. Someone can help to solve this problem?
      (sorry for my English grammar)

      1 Reply Last reply
      0
      • P Offline
        P Offline
        Philippe F.
        wrote on 18 Mar 2015, 12:09 last edited by Philippe F.
        #3

        one year later, the problem is still present.
        the turn around found by defining PIDLIST_ABSOLUTE as a pointer to LPITEMIDLIST is not enought here. Should not deference the return of SHParseDisplayName (with &file).
        <edit>
        turnaround found when trying to build under mingw , gcc version 4.8.1
        but not necessary under Qt's mingw gcc 4.9.1 found in actual Qt5.4.1 distribution
        </edit>

        my mod to pass this point :
        in fileutils.cpp line 298 :

        #ifdef Q_OS_WIN
        	const QString nativeSeparatorName(QDir::toNativeSeparators(name));
        	const LPCTSTR nameC = reinterpret_cast<LPCTSTR>(nativeSeparatorName.utf16()); // MinGW
        	LPITEMIDLIST file;//<<<<<<<<<< direct use of LPITEMIDLIST 
        	HRESULT hr = SHParseDisplayName(nameC, NULL, file, 0, NULL);//<<<<<<<< instead of &file
        	if (FAILED(hr))
        		return name;
        	TCHAR buffer[MAX_PATH];
        	
        	if (!SHGetPathFromIDList(file, buffer))
        		return name;
        	return QDir::fromNativeSeparators(QString::fromUtf16(reinterpret_cast<const ushort *>(buffer)));
        #else // Filesystem is case-insensitive only on Windows
        	return name;
        #endif
        
        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved