Cesar Strauss <ces...@gm...>
writes:
> On 13/5/2010 07:14, zwz wrote:
>> [ 0%] Generating precomp.hpp.gch/opencv_imgproc_Release.gch
>>
> d:/gnu/mingw/bin/../lib/gcc/mingw32/4.5.0/../../../libmingw32.a(main.o):main.c:(.text+0xd2):
>> undefined reference to `WinMain@16'
>> collect2: ld returned 1 exit status
>>
>
> Could you show the full gcc command line?
>
> When generating a precompiled header, please make sure you do not have
> any linker flag on the command line or, if you do, use it together with
> -c. Example:
>
> $ echo "extern int i;" > pch.h
>
> $ gcc pch.h
>
> (Success)
>
> $ gcc -Wl,--enable-auto-import pch.h
>
> c:/mingw/bin/../lib/gcc/mingw32/4.5.0/../../../libmingw32.a(main.o):main.c:(.text+0xd2):
> undefined reference to `WinMain@16'
> collect2: ld returned 1 exit status
>
> (Failure)
>
> $ gcc -Wl,--enable-auto-import -c pch.h
>
> (Success again)
Thanks for the tips.
The error was produced with the flags
"-Wl,--enable-runtime-pseudo-reloc-v2"
during the configuration of CMAKE.
If I added the the flag "-c", then it compiles
but cannot be linked.
I can remove all the flags and compile it
but then when I run the cvtest.exe, it reported "initialize
0xc0000005 error"
>
> Regards,
> Cesar
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> MinGW-users mailing list
> Min...@li...
>
> This list observes the Etiquette found at
> http://www.mingw.org/Mailing_Lists.
> We ask that you be polite and do the same. Disregard for the list etiquette may
> cause your account to be moderated.
>
> _______________________________________________
> You may change your MinGW Account Options or unsubscribe at:
> https://lists.sourceforge.net/lists/listinfo/mingw-users
|