< Our Aim>
We want to cross-compile an application for MS Windows under Linux with the compiler x86_64-w64-mingw32-gcc
This application is linking to libraries built from Windows platform.
< What we followed >
> Downloaded "mingw-w64-bin_x86_64-linux_20131228.tar.bz2" from https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Automated%20Builds/
> Extracted MinGW in a linux directory
> Updated the Makefile of application with the MinGW installed path
Example of makefile entries:
CROSS_PREFIX = /dev/abc/mingw64
VERSION = WORK
CC = $(CROSS_PREFIX)/bin/x86_64-w64-mingw32-gcc
LD = $(CC) -ansi -pedantic
COPT_CROSS_win = -O3 -MD -MP
DEFS = -DIW_NOT_DEBUG_CODE \
-DPROG_VERSION=\\\"$(VERSION)\\\" \
-D__ANSI_CPLUSPLUS \
-DUSE_NEW_IOSTREAMS -DHW_USE_STANDARD_STREAMS
DEFS_CROSS_win = $(DEFS) -D_WIN_
AR_CROSS_win = $(CROSS_PREFIX)ar cur
> Executed "make -f makefile" and getting below errors:
undefined reference to `__security_check_cookie'
undefined reference to `DhcpRequestParams'
undefined reference to `__chkstk'
undefined reference to `__GSHandlerCheck'
undefined reference to `__imp_freeaddrinfo'
> We have copied "BufferOverflowU.lib and msvcrt.lib" from window/ MSVC to build path, And the Cros compilation succeed without any error message.
> During execution of .exe in window platform, it is throwing below errors:
Error: "Code execution cannot proceed because crtdll.dll was not found"
< Our Queries >
Could you please guide/help us, how to fix this runtime error.
Please let us know, if we are missing something here.
Thank you in advance! Please consider it as a priority.
I would strongly suggest that you get the cross compiler from your distribution's package management system rather than using these (very old) builds.
Thank you Doug Semler!
Could you please suggest some link/sites from where we can get it. Means the distribution's package management system
It will be a great help.
FYI: I have tried to download one from "https://sourceforge.net/projects/mingw-w64/files/latest/download". It is an exe but we need a build for Linux .
is there a Linux version of the latest MinGW build? As we are cross-compile the application under Linux for MS Windows
Last edit: kljena2050 2019-04-10
Hi,
Can any one guide me here.
Can any one guide me here.
Thank you very much in advance!
On Thu, Apr 11, 2019 at 10:32 AM kljena2050 kljena2050@users.sourceforge.net wrote:
Related
Support Requests: #144