I'm a newbie to qt and opencv
using qt creator 3 with qt 5 on os x 10.9.1 opencv 2.4.8
When i'm trying out with my first program, i get this error.
Any one please help me.
Thank you

Qt Code:
  1. #include <opencv2/core/core.hpp>
  2. #include <opencv2/highgui/highgui.hpp>
  3.  
  4. using namespace cv;
  5.  
  6. int main()
  7. {
  8. //read image
  9. Mat image = imread("img.jpg");
  10. //create image window named "My image"
  11. namedWindow("My Image", CV_WINDOW_AUTOSIZE);
  12. //show the image on window
  13. imshow("My image", image);
  14. //wait key for 5000ms
  15. waitKey(5000);
  16. return 0;
  17. }
To copy to clipboard, switch view to plain text mode 

test.pro
Qt Code:
  1. QT += core
  2.  
  3. QT -= gui
  4.  
  5. TARGET = test
  6. CONFIG += console
  7. CONFIG -= app_bundle
  8.  
  9. TEMPLATE = app
  10.  
  11. INCLUDEPATH += /usr/local/include
  12. LIBS += -L/usr/local/lib \
  13. -opencv_core.dylib \
  14. -opencv_imgproc.dylib \
  15. -opencv_highgui.dylib \
  16. -opencv_features2d.dylib \
  17. -opencv_calib3d.dylib
  18. OTHER_FILES += img.jpg
  19. SOURCES += main.cpp
To copy to clipboard, switch view to plain text mode 

Error generated
Qt Code:
  1. Undefined symbols for architecture x86_64:
  2. "cv::_InputArray::_InputArray(cv::Mat const&)", referenced from:
  3. _main in main.o
  4. "cv::namedWindow(std::string const&, int)", referenced from:
  5. _main in main.o
  6. "cv::Mat::deallocate()", referenced from:
  7. _main in main.o
  8. "cv::imread(std::string const&, int)", referenced from:
  9. _main in main.o
  10. "cv::imshow(std::string const&, cv::_InputArray const&)", referenced from:
  11. _main in main.o
  12. "cv::waitKey(int)", referenced from:
  13. _main in main.o
  14. "cv::fastFree(void*)", referenced from:
  15. _main in main.o
  16. ld: symbol(s) not found for architecture x86_64
  17. clang: error: linker command failed with exit code 1 (use -v to see invocation)
  18. make: *** [test] Error 1
  19. 23:13:36: The process "/usr/bin/make" exited with code 2.
  20. Error while building/deploying project test (kit: Desktop Qt 5.2.0 clang 64bit)
  21. When executing step 'Make'
To copy to clipboard, switch view to plain text mode