i686-pc-mingw32-gcc: error: unrecognized option '-pthread'

Ian Lance Taylor iant@google.com
Wed Sep 19 17:48:00 GMT 2012


On Wed, Sep 19, 2012 at 8:43 AM, YuGiOhJCJ Mailing-List
<yugiohjcj-mailinglist@laposte.net> wrote:
>
> OK I found the corresponding option and I cross compiled libsmpeg.
> Now that's what I have:
> $ export PKG_CONFIG_PATH=/usr/i686-pc-mingw32/lib/pkgconfig
> $ ./configure --prefix=/usr/i686-pc-mingw32 --host=i686-pc-mingw32 --with-smpeg-prefix=/usr/i686-pc-mingw32 --disable-music-mod
> $ make
> /bin/sh ./libtool --mode=link i686-pc-mingw32-gcc -o build/playwave.exe build/playwave.lo -D_GNU_SOURCE=1 -Dmain=SDL_main -I/usr/i686-pc-mingw32/include/SDL   -mwindows -L/usr/i686-pc-mingw32/lib -lmingw32 -lSDLmain -lSDL   build/libSDL_mixer.la
> libtool: link: i686-pc-mingw32-gcc -o build/.libs/playwave.exe build/.libs/playwave.o -D_GNU_SOURCE=1 -Dmain=SDL_main -I/usr/i686-pc-mingw32/include/SDL -mwindows  -L/usr/i686-pc-mingw32/lib build/.libs/libSDL_mixer.dll.a /usr/i686-pc-mingw32/lib/libSDLmain.a /usr/i686-pc-mingw32/lib/libstdc++.dll.a -lmingw32 /usr/i686-pc-mingw32/lib/libSDL.dll.a -luser32 -lgdi32 -lwinmm  -L/usr/i686-pc-mingw32/lib
> /usr/i686-pc-mingw32/lib/libmingw32.a(main.o): In function `main':
> /home/yugiohjcj/documents/downloads/software/mingwrt-3.15.2-mingw32/main.c:73: undefined reference to `WinMain@16'
> collect2: error: ld returned 1 exit status
> make: *** [build/playwave.exe] Error 1
>
> So I have an undefined reference and what is strange is I can see the path /home/yugiohjcj/documents/downloads/software/mingwrt-3.15.2-mingw32/main.c which is the place where I built myself mingwrt. At this time, this path doesn't exist anymore. I see no reason this path is displayed on my screen...
>
> Do you understand this error message ?

No, you're in Windows specific land here.  You might try asking on the
cygwin mailing list.

Ian



More information about the Gcc-help mailing list