Menu

#144 [Urgent] Help on cross-compiling our application

v1.0 (example)
open
nobody
None
1
2019-04-11
2019-04-09
kljena2050
No

< 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.

Related

Support Requests: #144

Discussion

  • Doug Semler

    Doug Semler - 2019-04-09

    I would strongly suggest that you get the cross compiler from your distribution's package management system rather than using these (very old) builds.

     
  • kljena2050

    kljena2050 - 2019-04-10

    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
  • kljena2050

    kljena2050 - 2019-04-11

    Hi,
    Can any one guide me here.

     
    • kljena2050

      kljena2050 - 2019-04-12

      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:

      Hi,
      Can any one guide me here.


      Status: open
      Group: v1.0 (example)
      Created: Tue Apr 09, 2019 01:37 PM UTC by kljena2050
      Last Updated: Wed Apr 10, 2019 04:51 AM UTC
      Owner: nobody

      < 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 toDhcpRequestParams'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.


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/mingw-w64/support-requests/144/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

      Related

      Support Requests: #144


Log in to post a comment.