I'm still having issues with an ongoing project that just won't compile. I've narrowed it down to the Includes but can't figure out what is going on. I've read that i need to add a WinMain entry point but that doesnt add up - I have classmates that didnt encounter this shit error at all. So I've created a new empty project:
#include <cstdlib> //include c library
//using namespace std;
//using namespace cv;
namespace sp {
int main() {
return 0;
}
}
With the following includes:
Under GCC C++ Compiler Includes:
C:\Users\Amit\Desktop\opencv\build\include
C:\opencv_contrib-3.0.0\modules\xfeatures2d\include
Under MinGW C++ Linker Libraries:
libopencv_core310
libopencv_imgcodecs310
libopencv_imgproc310
libopencv_xfeatures2d310
libopencv_features2d310
libopencv_highgui310
Under MinGW C++ Linker Library search path:
C:\Users\Amit\Desktop\opencv\build\x86\mingw\lib
Still, without calling any function from those libraries, I'm getting this error:
09:45:43 **** Incremental Build of configuration Debug for project testing ****
Info: Internal Builder is used for build
g++ "-IC:\\opencv_contrib-3.0.0\\modules\\xfeatures2d\\include" "-IC:\\Users\\Amit\\Desktop\\opencv\\build\\include" -O0 -g3 -Wall -c -fmessage-length=0 -o "src\\testing.o" "..\\src\\testing.cpp"
g++ "-LC:\\Users\\Amit\\Desktop\\opencv\\build\\x86\\mingw\\lib" -o testing.exe "src\\testing.o" -llibopencv_core310 -llibopencv_imgcodecs310 -llibopencv_imgproc310 -llibopencv_xfeatures2d310 -llibopencv_features2d310 -llibopencv_highgui310
c:/mingw/bin/../lib/gcc/mingw32/4.9.3/../../../libmingw32.a(main.o):(.text.startup+0xa7): undefined reference to `WinMain@16'
collect2.exe: error: ld returned 1 exit status
09:45:43 Build Finished (took 396ms)
Can anyone save me?
Thanks, Amit.