Results 1 to 5 of 5

Thread: error: LNK1104: cannot open file 'libs.obj'

  1. #1
    Join Date
    Feb 2014
    Posts
    3
    Qt products
    Qt5
    Platforms
    Windows

    Unhappy error: LNK1104: cannot open file 'libs.obj'

    Hi,
    I am trying to run simple program of Opencv for opening camera.
    But after compiling i am getting linking error

    :-1: error: LNK1104: cannot open file 'G:\Opencv-2.4.5\Opencv\build\x86\libs.obj'
    I have checked libs folder but there is no libs.obj file present there

    This my .pro file

    Qt Code:
    1. #-------------------------------------------------
    2. #
    3. # Project created by QtCreator 2014-02-13T12:51:19
    4. #
    5. #-------------------------------------------------
    6.  
    7. QT += core gui
    8.  
    9. greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
    10.  
    11. TARGET = Project
    12. TEMPLATE = app
    13.  
    14.  
    15. SOURCES += main.cpp\
    16. mainwindow.cpp
    17.  
    18. HEADERS += mainwindow.h
    19.  
    20. FORMS += mainwindow.ui
    21.  
    22. INCLUDEPATH += G:\\Opencv-2.4.5\\Opencv\\build\\include
    23.  
    24. LIBS +=G:\\Opencv-2.4.5\\Opencv\\build\\x86\\libs \
    25. -lopencv_calib3d245 \
    26. -lopencv_calib3d245d \
    27. -lopencv_contrib245 \
    28. -lopencv_contrib245d \
    29. -lopencv_core245 \
    30. -lopencv_core245d \
    31. -lopencv_features2d245 \
    32. -lopencv_features2d245d \
    33. -lopencv_gpu245 \
    34. -lopencv_gpu245d \
    35. -lopencv_highgui245 \
    36. -lopencv_highgui245d \
    37. -lopencv_imgproc245 \
    38. -lopencv_imgproc245d \
    39. -lopencv_video245 \
    40. -lopencv_video245d
    To copy to clipboard, switch view to plain text mode 

    This is the code I have written

    Qt Code:
    1. #include "mainwindow.h"
    2. #include <QApplication>
    3. #include <opencv/cv.h>
    4. #include <opencv/highgui.h>
    5.  
    6. int main(int argc, char *argv[])
    7. {
    8. QApplication a(argc, argv);
    9. MainWindow w;
    10. w.show();
    11. CvCapture *capture = 0;
    12. IplImage *frame = 0;
    13. int key = 0;
    14.  
    15. /* initialize camera */
    16. capture = cvCaptureFromCAM( 0 );
    17.  
    18. /* always check */
    19. if ( !capture ) {
    20. fprintf( stderr, "Cannot open initialize webcam!\n" );
    21. return 1; }
    22.  
    23. cvSetCaptureProperty(capture, CV_CAP_PROP_FRAME_WIDTH, 640);
    24. cvSetCaptureProperty(capture, CV_CAP_PROP_FRAME_HEIGHT, 480);
    25.  
    26. cvSetCaptureProperty(capture, CV_CAP_PROP_FPS, 8);
    27.  
    28. /* create a window for the video */
    29. cvNamedWindow( "result", CV_WINDOW_AUTOSIZE );
    30.  
    31. while( key != 'q' ) {
    32. /* get a frame */
    33. frame = cvQueryFrame( capture );
    34.  
    35. /* always check */
    36. if( !frame ) break;
    37.  
    38. /* display current frame */
    39. cvShowImage("Left", frame);
    40.  
    41. /* exit if user press 'q' */
    42. key = cvWaitKey( 1 ); }
    43.  
    44. /* free memory */
    45. cvDestroyWindow( "result" );
    46. cvReleaseCapture( &capture );
    47. return a.exec();
    48. }
    To copy to clipboard, switch view to plain text mode 

    Snapshot of error

    error.jpg

    Can anybody help me please?

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: error: LNK1104: cannot open file 'libs.obj'

    In your LIBS varriable you need -L before the path to the libraries.

    Cheers,
    _

  3. #3
    Join Date
    Feb 2014
    Posts
    3
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: error: LNK1104: cannot open file 'libs.obj'

    Thanks ,
    But its not working..
    Still I am getting same error

  4. #4
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: error: LNK1104: cannot open file 'libs.obj'

    How does your LIBS variable look now?

    Cheers,
    _

  5. #5
    Join Date
    Feb 2014
    Posts
    3
    Qt products
    Qt5
    Platforms
    Windows

    Red face Re: error: LNK1104: cannot open file 'libs.obj'

    Got it..
    The path was wrong...
    Thank you...

Similar Threads

  1. file.open error
    By pheonixstorm in forum Newbie
    Replies: 14
    Last Post: 9th July 2011, 05:12
  2. fatal error LNK1104: cannot open file 'libgles_cm.lib
    By danmaliki in forum Installation and Deployment
    Replies: 2
    Last Post: 24th March 2011, 13:17
  3. Replies: 3
    Last Post: 1st November 2010, 16:33
  4. Replies: 0
    Last Post: 3rd June 2010, 04:54
  5. Replies: 4
    Last Post: 9th May 2010, 16:18

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.