(Partial - Solved)Error while building.



  • Hi i am using Qt 4.8 with MSVS 10. when build my project i encountered an error.

    1>LINK : fatal error LNK1104: cannot open file '.obj'

    i don't know why is it happening?
    Any help.
    Thanks.


  • Lifetime Qt Champion

    Hi,

    Without more information, it's pretty much Crystal Ball debugging. Got any spaces in your paths (project itself, library etc.) ?

    Can you share your pro file ?



  • hi ..
    Because i am using Qt with MSVS 10 there is no .pro file by default as it creates in Qt Creator.
    I have added my lib using references of MSVS 10.


  • Lifetime Qt Champion

    Then how are you handling your Qt project ? The Visual Studio AddIn ?



  • Hii.

    when i make a new project using Qt 4.8 add ins with MSVS 10 then i found there is no .pro file in my source directory.
    in order to get .pro file.then there is an option of creating .pro file in MSVS 10 menu "Qt" -->create basic .pro file.

    after creating my .pro file it shows me the following..

    ----------------------------------------------------

    This file is generated by the Qt Visual Studio Add-in.

    ------------------------------------------------------

    @TEMPLATE = app
    TARGET = AudioTest
    DESTDIR = ../Win32/Debug
    QT += core gui multimedia
    CONFIG += debug console
    DEFINES += QT_LARGEFILE_SUPPORT QT_DLL QT_MULTIMEDIA_LIB
    INCLUDEPATH += .
    ./GeneratedFiles/Debug
    LIBS += -L"../"
    -l/
    -l$(INHERIT)/
    -llibmpg123-0
    PRECOMPILED_HEADER = StdAfx.h
    DEPENDPATH += .
    MOC_DIR += ./GeneratedFiles/debug
    OBJECTS_DIR += debug
    UI_DIR += ./GeneratedFiles
    RCC_DIR += ./GeneratedFiles
    HEADERS += ./mpg123.h
    ./Audio.h
    ./ReadWrite.h
    SOURCES += ./Audio.cpp
    ./main.cpp
    ./ReadWrite.cpp@

    my another question why does .pro not create itself when we use Qt add-ins with MSVS10
    Thanks.



  • Seems no help after providing .pro ?



  • There can be plenty of reasons for your problem.

    • Not having enough permission rights for the user
    • VS path not set properly

    May be you can try clean the solution, see the build output related to your error while building. If the clean is successful, you might think off building the solution again.



  • Hi.
    Thanks for reply friend..

    [quote author="kumararajas" date="1417155897"]There can be plenty of reasons for your problem.

    • Not having enough permission rights for the user
    • VS path not set properly

    May be you can try clean the solution, see the build output related to your error while building. If the clean is successful, you might think off building the solution again.[/quote]

    the first two points you have said not an issue form me because i have made many projects without considering these issues.

    second thing is i did clean and rebuild my project at least 30 times again and again but encountering the same problem,even i have checked into references section where i added my libs No problem at all.


  • Lifetime Qt Champion

    Since you are using the VS-AddIn you get a VS project (that you can also generate from the pro file)

    @HEADERS += ./mpg123.h @

    mpg123.h doesn't belong here, you should rather have the path to in in an INCLUDEPATH += statement


  • Lifetime Qt Champion

    Still the same error ?



  • yes same error



  • Problem is solved when i build in Qt Creator. *

    Thanks.

    *but still with Visual Studio 10.


Log in to reply
 

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