remove the whole build directory first, then build.
I always remove the build directory, but that didn't help. I finally solved the problem switching to gcc v4.6.3, everything compiled right!
So, there must be some linking bug in gcc 4.8.1 with curl.
If anyone encounter the same problem:
- Get MinGW Builds:
http://sourceforge.net/projects/mingwbuilds/- Install it with these options: version:4.6.3 Architecture:x32 Threads:win32 Exception:dwarf Build:2 and choose a separate folder, like c:\Mingw-4.6.3
- Copy the whole content of c:\Mingw-4.6.3\mingw to c:\MinGW and overwrite all files
- before compiling, do a "make clean"
- Done!