OpenCV just won't run on Code::Blocks [closed]
Hello,
each time I run default program, it just refuses to run.
In function `main':
C:/opencv/buld_cb/wedwedwe/main.cpp:8: undefined reference to `cv::imread(cv::String const&, int)'
C:/opencv/buld_cb/wedwedwe/main.cpp:11: undefined reference to `cv::namedWindow(cv::String const&, int)'
C:/opencv/buld_cb/wedwedwe/main.cpp:12: undefined reference to `cv::imshow(cv::String const&, cv::_InputArray const&)'
C:/opencv/buld_cb/wedwedwe/main.cpp:13: undefined reference to `cv::waitKey(int)'
obj\Debug\main.o: In function `ZN2cv6StringC1EPKc':
C:/opencv/buld_cb/install/include/opencv2/core/cvstd.hpp:602: undefined reference to `cv::String::allocate(unsigned int)'
obj\Debug\main.o: In function `ZN2cv6StringD1Ev':
C:/opencv/buld_cb/install/include/opencv2/core/cvstd.hpp:648: undefined reference to `cv::String::deallocate()'
obj\Debug\main.o: In function `ZN2cv3MatD1Ev':
C:/opencv/buld_cb/install/include/opencv2/core/mat.inl.hpp:704: undefined reference to `cv::fastFree(void*)'
obj\Debug\main.o: In function `ZN2cv3Mat7releaseEv':
C:/opencv/buld_cb/install/include/opencv2/core/mat.inl.hpp:816: undefined reference to `cv::Mat::deallocate()'
collect2.exe: error: ld returned 1 exit status
I'm new to OpenCV and to C++ in general so I have almost no clue what to do. I tried to follow manuals, I did this stuff with CMake building (where I had to delete some AVX stuff in GPU_DISPATCH and then completly disable Python features, because it just won't set up in Code::Blocks either way) and MinGW building after that.
I have paths in my Windows 10 OS for C:\TDM-GCC-64\bin, C:\Program Files\TortoiseGit\bin, C:\Program Files\Git\cmd, C:\Program Files\CMake\bin, C:\MinGW\bin, C:\opencv\buld_cb\bin
In search directories, as a compiler I have C:\opencv\buld_cb\install\include\opencv2, and as a linker I have C:\opencv\buld_cb\lib, both in Debug and Realise. In linker settings, I have all those .a files from C:\opencv\buld_cb\lib
When I make new OpenCV project with such settings as in picture and try to run a default code, it just refuses to do so with errors I copypasted earlier.
I actually managed to launch OpenCV in Code::Blocks somehow, but I have no clue what to do now to run a program. Help please, thanks.
it is a linker problem, so look again, which .a files are added there
and which files should be there? I honestly don't know, there are 65 .a files
maybe you should put CB aside for a moment, and try a simple:
I'm sorry, but where do I type this?
ok, forget that idea. can't help here, sorry.
could anyone help me, please?
please? ;_;