Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: Souradeep on February 06, 2011, 05:28:23 pm

Title: opencv in c:b
Post by: Souradeep on February 06, 2011, 05:28:23 pm
I want to use opencv1.1pre1a in c:b. I went through the wiki about running opencv and followed the steps. But I got the following errors when I tried to build a program on dislaying an image. Please help me out ... Really frustrated :(
/code
include <stdio.h>
#include <stdlib.h>
#include "cv.h"
#include "highgui.h"
int main( int argc, char** argv )
{
    IplImage* img = cvLoadImage( argv[1],1 );
    cvNamedWindow( "Example1", CV_WINDOW_AUTOSIZE );
    cvShowImage( "Example1", img );
    cvWaitKey(0);
    cvReleaseImage( &img );
    cvDestroyWindow( "Example1" );
}
/code
error
/code
obj\Debug\main.o||In function `main':|
C:\Users\AGM-P\cv\loo\main.c|7|undefined reference to `cvLoadImage'|
C:\Users\AGM-P\cv\loo\main.c|8|undefined reference to `cvNamedWindow'|
C:\Users\AGM-P\cv\loo\main.c|9|undefined reference to `cvShowImage'|
C:\Users\AGM-P\cv\loo\main.c|10|undefined reference to `cvWaitKey'|
C:\Users\AGM-P\cv\loo\main.c|12|undefined reference to `cvDestroyWindow'|
||=== Build finished: 5 errors, 0 warnings ===|
/code
Title: Re: opencv in c:b
Post by: stahta01 on February 06, 2011, 05:52:45 pm
Turn on Full Compiler Logging; then find a site that supports your Compiler, OS, and the third party library.

http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F

Title: Re: opencv in c:b
Post by: ollydbg on February 08, 2011, 09:02:25 am
also, read this CodeBlocks - OpenCV Wiki (http://opencv.willowgarage.com/wiki/CodeBlocks)
and post the full build log here as stahta01 said.