I tried to run a program on opencv but got the following error:
test_1.cpp:(.text+0x44): undefined reference to `cv::imread(std::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&, int)'
I learnt that the order of sources and libraries on the link line matters
So, running g++ -o test_1 test_1.cpp
pkg-config opencv --cflags --libs works.
However, how can I setup code blocks so that when I build the code, it applies the correct order?