Results 1 to 10 of 10

Thread: Problem - Kernel32.lib

  1. #1
    Join Date
    Oct 2012
    Posts
    4
    Platforms
    Windows

    Unhappy Problem - Kernel32.lib

    Hello all,

    I am new to QT, and I tried to reinstall the QT-SDK 5 times, but the following problem persists: when I try to compile the program, the message
    :-1: error: LNK1104: cannot open file 'kernel32.lib'
    . (It happens with all programs that I try to compile)

    More details of the output:
    14:55:25: Running build steps for project teste...
    14:55:25: Configuration unchanged, skipping qmake step.
    14:55:25: Starting: "C:\QtSDK\QtCreator\bin\jom.exe"
    LINK : fatal error LNK1104: cannot open file 'kernel32.lib'
    link /LIBPATH:"c:\QtSDK\Desktop\Qt\4.8.1\msvc2008\lib" /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /MANIFEST /MANIFESTFILE:"debug\teste.intermediate.manifest" /SUBSYSTEM:WINDOWS "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /OUT:debug\teste.exe @C:\Users\GUILHE~1\AppData\Local\Temp\teste.exe.43 84.0.jom
    C:\QtSDK\QtCreator\bin\jom.exe -f Makefile.Debug
    jom: C:\Users\Guilherme Dantas\teste-build-desktop-Qt_4_8_1_for_Desktop_-_MSVC2008__Qt_SDK__Debug\Makefile.Debug [debug\teste.exe] Error 1104

    jom 1.0.8 - empower your cores

    jom: C:\Users\Guilherme Dantas\teste-build-desktop-Qt_4_8_1_for_Desktop_-_MSVC2008__Qt_SDK__Debug\Makefile [debug] Error 2
    14:55:26: The process "C:\QtSDK\QtCreator\bin\jom.exe" exited with code 2.
    Error while building project teste (target: Desktop)
    When executing build step 'Make'
    My operating system: Windows 7 - 64 bits
    Version of QT Creator: 2.4.1

    More informations: I also use microsoft visual studio 2010. I tried to install mingw in my QT Creator and the error is still present. I also found the kernel32.lib in my computer, it's in the following directory:
    C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib
    I would like to know how I can make my QTCreator work. I don't care if I will use mingw or the visual studio compilator, I just would like to have a fast solution

    I fould in the internet other ppl asking the same thing but the answers are not precise for a beginner or are not clear.
    Example:
    http://stackoverflow.com/questions/3...e-kernel32-lib

    Thanks in advance,
    Guilherme

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Problem - Kernel32.lib

    How did you inform the compiler where to find that library?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Oct 2012
    Posts
    4
    Platforms
    Windows

    Default Re: Problem - Kernel32.lib

    Good question wysota: Actually I did not do anything: the configurations of the compiler, of the linker, etc. were all automatically determined after I install the program (and I do not know how to configure the kernel32.lib path - that would be interesting, and would maybe solve my problem). I tried to install Mingw, I tried to change some building configurations, but I still cannot find the root of my problem.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Problem - Kernel32.lib

    Quote Originally Posted by Guilherme Dantas View Post
    Good question wysota: Actually I did not do anything:
    So it's not surprising it can't find it

    the configurations of the compiler, of the linker, etc. were all automatically determined after I install the program (and I do not know how to configure the kernel32.lib path - that would be interesting, and would maybe solve my problem). I tried to install Mingw, I tried to change some building configurations, but I still cannot find the root of my problem.
    How did you tell your compiler to actually try to link with kernel32?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Oct 2012
    Posts
    4
    Platforms
    Windows

    Default Re: Problem - Kernel32.lib

    I did not tell anything to my compiler, I just installed the program and the configurations were automatically set.

    error.jpg

    I do not know how to choice the path of my kernel32.lib and every configuration that I use was auto-detected. How could I actually inform my compiler to not use kernel32.lib or to use a correct path for it? I am a complete beginner with QT

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Problem - Kernel32.lib

    Quote Originally Posted by Guilherme Dantas View Post
    I did not tell anything to my compiler, I just installed the program and the configurations were automatically set.
    Do you need kernel32.lib for anything then? What are you trying to build?

    I don't think Qt has anything to do with this. The problem seems to be with your MSVC installation.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  7. #7
    Join Date
    Oct 2012
    Posts
    4
    Platforms
    Windows

    Default Re: Problem - Kernel32.lib

    I really don't need kernel32.lib, It's just for a simple project of a discipline of my university...and my visual studio works perfectly. So, how could I solve the problem?

    Thanks for all the help

  8. #8
    Join Date
    Oct 2012
    Posts
    16
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Red face Re: Problem - Kernel32.lib

    If you are familiar with MS VS-2010. It will probably be easier for you to work from there.
    You've already installed QT SDK so all you need to do is install the QT MS Visual Studio 2010 add-in. Just Google "qt-vs-addin-1.1.11-opensource.exe" to find where to download from.
    Make sure you set the environment variable QTDIR to point to QT install directory (c:\Qt\4.4.8 or something like that).

    The VS add-in should take care of setting up everything else. It adds templates for Qt projects to your New Project dialog.

  9. #9
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Problem - Kernel32.lib

    Quote Originally Posted by Guilherme Dantas View Post
    I really don't need kernel32.lib, It's just for a simple project of a discipline of my university...and my visual studio works perfectly. So, how could I solve the problem?
    So what does your project file look like?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  10. #10
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Problem - Kernel32.lib

    More details of the output:
    Qt Code:
    1. 14:55:25: Running build steps for project teste...
    2. 14:55:25: Configuration unchanged, skipping qmake step.
    3. 14:55:25: Starting: "C:\QtSDK\QtCreator\bin\jom.exe"
    4. LINK : fatal error LNK1104: cannot open file 'kernel32.lib'
    5. link /LIBPATH:"c:\QtSDK\Desktop\Qt\4.8.1\msvc2008\lib" /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /MANIFEST /MANIFESTFILE:"debug\teste.intermediate.manifest" /SUBSYSTEM:WINDOWS "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /OUT:debug\teste.exe @C:\Users\GUILHE~1\AppData
    To copy to clipboard, switch view to plain text mode 
    From that link command it looks like the Qt binaries installed are MSVC 2008.
    Guilherme is using MSVC 2010 in Visual Studio 2010 which is a binary mismatch.
    In the Qt SDK updater download and use the MSVC 2010 Qt libraries rather than the 2008 ones.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.