Not able to build a Qt project in visual studio 2005



  • When i am building my project in visual studio 2005 its end up with the following error fatal error LNK1181: cannot open input file 'QtCored.lib'. Please let me know where i am failing .


  • Moderators

    What version are you running?
    Anyhow is the Qt lib directory in your PATH setting?
    Do you have an environment setting QTDIR?



  • Visual studio 2005
    qt-win-commercial-4.7.3-vs2005
    qt-vsintegration-1.4.3........

    The rest two question i am not able to understand .I am very new to programming ..
    Please help .



  • In your .pro file u,ve to include path like this.
    INCLUDEPATH += include

    Through terminal for ubuntu 1ly we use $export QTDIR. is it right


  • Moderators

    [quote author="Vikuseth" date="1353404085"]
    The rest two question i am not able to understand .I am very new to programming ..
    Please help .
    [/quote]
    In VS2005 you have in the menu line under "Tools" somethings like "Visual Studio Command Prompt". Start this and you will be in a typical "windows" command prompt. There you type followed by a return:
    @
    set path
    @
    You will receive a lengthy list with different directories/folders. Check if the Qt libs directories are in there. E.g. "c:/Qt/4.7.3/bin" and "c:/Qt/4.7.3/lib" in your case.
    Furthermore this command
    @
    set QTDIR
    @
    should be set to "c:/Qt/4.7.3"
    The settings depend on your actual installation. So, they might differ.



  • As you said .. I got the same thing , whatever you have mentioned above .But still getting the same errror . I set the QMAKESPEC also to the following location C:\Qt\4.7.3\mkspecs\win32-msvc2005..

    But i am still getting the same error..


  • Moderators

    Are you using VS2005 as IDE or only the compilers?
    BTW since you are using a paid commercial version you are entitled for support from Digia.



  • When we are integrating Qt 4.7.3 with visual studio 2005 and tries to create one Qt project in IDE , its giving a fatal error stating Qtcored.lib is missing . Actually if you go ..\Qt\4.7.3\lib folder there is nothing called Qtcored.lib ,But there is Qtcored4.lib . I think they have renamed it (not sure) . Now goto projproperties->linker->input->additionaldependency and remove Qtcored.lib from there and add Qtcored4.lib. Now if you build the project it will work fine ..

    Cheerssss.. :)


  • Moderators

    When you are the using the vs 2005 IDE you can use also "vsaddin":http://releases.qt-project.org/vsaddin/qt-vs-addin-1.1.11-opensource.exe .
    The problem you had might be through the use vs-integration. I had installed it a couple of years ago. I am using vsaddin at least for 5 years already.

    The libs name convention contains already for a couple of years. It is certainly not a recent change.



  • you compiled only QtSDK released.

    In Visual Studio configure in mode released.
    or
    Rebuild QtSDK for --released and --debug

    vsaddin just necessary if you use VS-IDE for build your project.
    Use qtcreator6.0, he compile in vs2005 and or mingw without IDEVS2005 or greater.



  • So you are saying vsaddin is used only to build a Qt project inside VS2205 ?
    [quote author="Flavio Portela" date="1353543932"]you compiled only QtSDK released.

    In Visual Studio configure in mode released.
    or
    Rebuild QtSDK for --released and --debug

    vsaddin just necessary if you use VS-IDE for build your project.
    Use qtcreator6.0, he compile in vs2005 and or mingw without IDEVS2005 or greater.[/quote]


  • Moderators

    [quote author="Vikuseth" date="1353560942"]So you are saying vsaddin is used only to build a Qt project inside VS2205 ?
    [quote author="Flavio Portela" date="1353543932"]you compiled only QtSDK released.

    In Visual Studio configure in mode released.
    or
    Rebuild QtSDK for --released and --debug

    vsaddin just necessary if you use VS-IDE for build your project.
    Use qtcreator6.0, he compile in vs2005 and or mingw without IDEVS2005 or greater.[/quote]

    [/quote]
    vsaddin helps you to manage projects within the vs2005 IDE (and other vs versions). However, you need to have a licensed vs version. The free express versions do not allow addins.
    You can load .pro files and create .pro files for compatibility with creator respectively other qmake driven environments.
    When using vsaddin you do not need to bother qmake. The creation and use of Qt in the IDE is seamless.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.