[CrossCompil] Undefined reference to msvcrt

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[CrossCompil] Undefined reference to msvcrt

AurelienV
Hi everyone,

I have a really weird mistake when I try to cross compile (from linux to windows) on a custom gst-plugin.

In fact, I already success to do the job but recently I have the following error during linking step:

/home/dev/cerbero/build/dist/windows_x86/lib/libmingwex.a(lib32_libmingwex_a-mingw_output_format.o): in function « call_set_output_format »:
/home/andoni/cerbero/sources/mingw-w32-lin/mingw-w64-v2.0.8/mingw-w64-crt/misc/mingw_output_format.c:13: undefined reference to « __mingw_get_msvcrt_handle »
/home/dev/cerbero/build/dist/windows_x86/lib/libmingwex.a(lib32_libmingwex_a-mingw_output_format.o): in function « call_get_output_format »:
/home/andoni/cerbero/sources/mingw-w32-lin/mingw-w64-v2.0.8/mingw-w64-crt/misc/mingw_output_format.c:25: undefined reference to « __mingw_get_msvcrt_handle »
/home/dev/cerbero/build/dist/windows_x86/lib/libmingwex.a(lib32_libmingwex_a-mingw_get_codepage.o): in function « init_codepage_func »:
/home/andoni/cerbero/sources/mingw-w32-lin/mingw-w64-v2.0.8/mingw-w64-crt/misc/mingw_get_codepage.c:23: undefined reference to « __mingw_get_msvcrt_handle »
collect2: error: ld returned 1 exit status
Makefile:229: recipe for target 'all' failed

Small details about my cross-compilation setup:
+ Compilation commands are based on Cerbero files:
---> # ./cerbero-uninstalled -c config/cross-win32.cbc bootstrap
---> # ./cerbero-uninstalled -c config/cross-win32.cbc build gstreamer-1.0 gst-plugins-bad-1.0 (for tsdemux and tsparse)
---> Thanks to cerbero, I've got all necessary files and dll to correctly build a custom gst-plugin.

+ To build my custom plugin, I use a custom Makefile (which has already perfectly work for these targeted files) which point on following libraries: libgstreamer-1.0.dll / libgobject-2.0.dll / libgmodule-2.0.dll / gthread-2.0.dll / libglib-2.0.dll

I'm (almost) sure that it's not a problem from Makefile because I used it lots of time before, and I don't make any changes on it.

So my questions are:
- Why did i have references to "/home/andoni/cerbero/.../mingw_****.c" ? Of course, my working directory isn't "/home/andoni" but "/home/dev", don't who is it ^^ (maybe is it a reference to Andoni Morales ???).
- How did i can solve this mistake?

Best Regards
AurelienV
Reply | Threaded
Open this post in threaded view
|

Re: [CrossCompil] Undefined reference to msvcrt

AurelienV
It was due to calling of sprintf from a part of my code ...