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. :-1: error: LNK1104: cannot open file 'kernel32.lib'

:-1: error: LNK1104: cannot open file 'kernel32.lib'

Scheduled Pinned Locked Moved Installation and Deployment
10 Posts 3 Posters 19.9k Views
  • 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.
  • B Offline
    B Offline
    BrEaDFace
    wrote on last edited by
    #1

    I seem to get that error always no matter what I do. I'm trying to run some examples. I tried reinstalling everything and tried to search everywhere from this forum or internet but cant find a solution.
    I'm using windows vista with Qt Creator 2.0.1.

    This is the compile output for borderlayout example:
    @Running build steps for project borderlayout...
    Starting: "c:\qtsdk\desktop\qt\4.7.3\msvc2008\bin\qmake.exe" C:\QtSDK\Examples\4.7\layouts\borderlayout\borderlayout.pro -r -spec win32-msvc2008 QMLJSDEBUGGER_PATH=C:/QtSDK/QtCreator/share/qtcreator/qml/qmljsdebugger
    The process "c:\qtsdk\desktop\qt\4.7.3\msvc2008\bin\qmake.exe" exited normally.
    Starting: "C:\QtSDK\QtCreator\bin\jom.exe"
    C:\QtSDK\QtCreator\bin\jom.exe -nologo -j 2 -f Makefile.Debug
    cl -c -nologo -Zm200 -Zc:wchar_t- -Zi -MDd -GR -EHsc -W3 -w34100 -w34189 -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -I"........\Desktop\Qt\4.7.3\msvc2008\include\QtCore" -I"........\Desktop\Qt\4.7.3\msvc2008\include\QtGui" -I"........\Desktop\Qt\4.7.3\msvc2008\include" -I"........\Desktop\Qt\4.7.3\msvc2008\include\ActiveQt" -I"debug" -I"..\borderlayout" -I"." -I"........\Desktop\Qt\4.7.3\msvc2008\mkspecs\win32-msvc2008" -Fodebug\ @C:\Users\Matti\AppData\Local\Temp\borderlayout.obj.3204.47.jom
    borderlayout.cpp
    main.cpp
    Generating Code...
    cl -c -nologo -Zm200 -Zc:wchar_t- -Zi -MDd -GR -EHsc -W3 -w34100 -w34189 -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -I"........\Desktop\Qt\4.7.3\msvc2008\include\QtCore" -I"........\Desktop\Qt\4.7.3\msvc2008\include\QtGui" -I"........\Desktop\Qt\4.7.3\msvc2008\include" -I"........\Desktop\Qt\4.7.3\msvc2008\include\ActiveQt" -I"debug" -I"..\borderlayout" -I"." -I"........\Desktop\Qt\4.7.3\msvc2008\mkspecs\win32-msvc2008" -Fodebug\ @C:\Users\Matti\AppData\Local\Temp\window.obj.3204.78.jom
    window.cpp
    C:\QtSDK\Desktop\Qt\4.7.3\msvc2008\bin\moc.exe -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -I"........\Desktop\Qt\4.7.3\msvc2008\include\QtCore" -I"........\Desktop\Qt\4.7.3\msvc2008\include\QtGui" -I"........\Desktop\Qt\4.7.3\msvc2008\include" -I"........\Desktop\Qt\4.7.3\msvc2008\include\ActiveQt" -I"debug" -I"..\borderlayout" -I"." -I"........\Desktop\Qt\4.7.3\msvc2008\mkspecs\win32-msvc2008" -D_MSC_VER=1500 -DWIN32 ..\borderlayout\window.h -o debug\moc_window.cpp
    cl -c -nologo -Zm200 -Zc:wchar_t- -Zi -MDd -GR -EHsc -W3 -w34100 -w34189 -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -I"........\Desktop\Qt\4.7.3\msvc2008\include\QtCore" -I"........\Desktop\Qt\4.7.3\msvc2008\include\QtGui" -I"........\Desktop\Qt\4.7.3\msvc2008\include" -I"........\Desktop\Qt\4.7.3\msvc2008\include\ActiveQt" -I"debug" -I"..\borderlayout" -I"." -I"........\Desktop\Qt\4.7.3\msvc2008\mkspecs\win32-msvc2008" -Fodebug\ @C:\Users\Matti\AppData\Local\Temp\moc_window.obj.3204.15148.jom
    moc_window.cpp
    link /LIBPATH:"c:\QtSDK\Desktop\Qt\4.7.3\msvc2008\lib" /NOLOGO /DEBUG /MANIFEST /MANIFESTFILE:"debug\borderlayout.intermediate.manifest" /SUBSYSTEM:WINDOWS "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='' processorArchitecture=''" /OUT:debug\borderlayout.exe @C:\Users\Matti\AppData\Local\Temp\borderlayout.exe.3204.23666.jom
    LINK : fatal error LNK1104: cannot open file 'kernel32.lib'

    jom 1.0.3 - empower your cores

    command failed with exit code 1104
    command failed with exit code 2
    The process "C:\QtSDK\QtCreator\bin\jom.exe" exited with code 2.
    Error while building project borderlayout (target: Desktop)
    When executing build step 'Make'@

    Could any1 tell me how to fix this or help me with teamviewer? :/
    Thank you.

    Life without programming is like bread without butter - USELESS

    1 Reply Last reply
    0
    • S Offline
      S Offline
      secretNinja
      wrote on last edited by
      #2

      Could you give some more information? Is this error there even in an empty project?

      1 Reply Last reply
      0
      • B Offline
        B Offline
        BrEaDFace
        wrote on last edited by
        #3

        In an empty project theres the following:
        :-1: warning: LNK4001: no object files specified; libraries used
        :-1: warning: LNK4068: /MACHINE not specified; defaulting to X86
        :-1: error: LNK2001: unresolved external symbol _WinMainCRTStartup
        debug\untitled.exe:-1: error: LNK1120: 1 unresolved externals

        Compile output:
        @Running build steps for project untitled...
        Starting: "c:\qtsdk\desktop\qt\4.7.3\msvc2008\bin\qmake.exe" C:\Users\Matti\Downloads\untitled\untitled.pro -r -spec win32-msvc2008 QMLJSDEBUGGER_PATH=C:/QtSDK/QtCreator/share/qtcreator/qml/qmljsdebugger
        The process "c:\qtsdk\desktop\qt\4.7.3\msvc2008\bin\qmake.exe" exited normally.
        Starting: "C:\QtSDK\QtCreator\bin\jom.exe"
        C:\QtSDK\QtCreator\bin\jom.exe -nologo -j 2 -f Makefile.Debug
        link /LIBPATH:"c:\QtSDK\Desktop\Qt\4.7.3\msvc2008\lib" /NOLOGO /DEBUG /MANIFEST /MANIFESTFILE:"debug\untitled.intermediate.manifest" /SUBSYSTEM:WINDOWS "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='' processorArchitecture=''" /OUT:debug\untitled.exe @C:\Users\Matti\AppData\Local\Temp\untitled.exe.5764.31.jom
        LINK : warning LNK4001: no object files specified; libraries used
        LINK : warning LNK4068: /MACHINE not specified; defaulting to X86
        LINK : error LNK2001: unresolved external symbol _WinMainCRTStartup
        debug\untitled.exe : fatal error LNK1120: 1 unresolved externals

        jom 1.0.3 - empower your cores

        command failed with exit code 1120
        command failed with exit code 2
        The process "C:\QtSDK\QtCreator\bin\jom.exe" exited with code 2.
        Error while building project untitled (target: Desktop)
        When executing build step 'Make'@

        Sorry im not really good in Qt :/

        Life without programming is like bread without butter - USELESS

        1 Reply Last reply
        0
        • S Offline
          S Offline
          secretNinja
          wrote on last edited by
          #4

          Is "msvc2008" the only folder in c:\qtsdk\desktop\qt\4.7.3?
          I have "c:\qtsdk\desktop\qt\4.7.3\mingw" and it is used.

          Which version of the SDK do you have? Why don't you install a newer version of QtCreator ( "the latest QtCreator beta is here":http://developer.qt.nokia.com/prereleases or "the latest stable version 2.1":http://qt.nokia.com/downloads/qt-creator-binary-for-windows ).

          /offtopic I'm new to Qt too ... and I'm not sure that I could help but I will try :)

          1 Reply Last reply
          0
          • B Offline
            B Offline
            BrEaDFace
            wrote on last edited by
            #5

            bq. Is “msvc2008” the only folder in c:\qtsdk\desktop\qt\4.7.3?
            I have “c:\qtsdk\desktop\qt\4.7.3\mingw” and it is used.

            There is no other folders in 4.7.3 than msvc2008

            I tried to download the latest again but still same error :(

            Life without programming is like bread without butter - USELESS

            1 Reply Last reply
            0
            • Y Offline
              Y Offline
              yshurik
              wrote on last edited by
              #6

              Maybe you haven't installed vs2008?
              Other case that you have installed vs2008ee, but not installed ms platform sdk.

              1 Reply Last reply
              0
              • B Offline
                B Offline
                BrEaDFace
                wrote on last edited by
                #7

                Umagad i need vs 2008? i had qt on my previus comp and i didnt need vs 2008. is there anyway i wouldnt have to use vs2008?

                Life without programming is like bread without butter - USELESS

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  secretNinja
                  wrote on last edited by
                  #8

                  Yes...you don't need Visual Studio. But you need to have at least MinGW ( maybe there're other options but I'm not aware of them).

                  Here is my setup:
                  !http://img62.imageshack.us/img62/3027/mingw.png(MinGW)!

                  If you install it, you could compile your code with it...hopefully this error will be gone :)

                  1 Reply Last reply
                  0
                  • B Offline
                    B Offline
                    BrEaDFace
                    wrote on last edited by
                    #9

                    it works thx for all the efforts ninjaman. ur the coolest guy i ever met. i guess i had some problems with mingw

                    Life without programming is like bread without butter - USELESS

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      secretNinja
                      wrote on last edited by
                      #10

                      This was the coolest comment I've ever read ... thank you!

                      Hope to see you here more often :)

                      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