Recent

Author Topic: Problem with Win64 exe inder Lazarus 2.0.10  (Read 599 times)

Neville

  • New Member
  • *
  • Posts: 41
Problem with Win64 exe inder Lazarus 2.0.10
« on: October 27, 2020, 07:52:27 pm »
I have the new 2.0.10 Lazarus for Win64 with Win32 cross compiling option. I have no trouble generally, but one particular project compiles fine (for Win64), but will not run.  I get an error 0xc000007b before the program even runs.  It doesn't get as far as the first line in the project main file "  Application.Scaled:=True;". 

I recompiled to generate Win32 exe, and that runs absolutely fine.  Has anyone any suggestions? 

440bx

  • Hero Member
  • *****
  • Posts: 3921
Re: Problem with Win64 exe inder Lazarus 2.0.10
« Reply #1 on: October 27, 2020, 08:02:01 pm »
error 0xC000 007B (STATUS_INVALID_IMAGE_FORMAT) is most commonly caused by an attempt to load a dll that is not the same bitness as the process/executable.

From what you described, it seems likely that your 64bit application is attempting to load (either statically or dynamically) a 32bit dll.

HTH.
(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v3.2) on Windows 7 SP1 64bit.

Neville

  • New Member
  • *
  • Posts: 41
Re: Problem with Win64 exe inder Lazarus 2.0.10
« Reply #2 on: October 27, 2020, 09:09:23 pm »
Thank you.  I feel that you're probably right.  I'm front-ending LP_Solve which comes as a DLL, almost certainly 32 bit, so that'll be the answer.

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: Problem with Win64 exe inder Lazarus 2.0.10
« Reply #3 on: October 28, 2020, 11:17:23 am »
I'm front-ending LP_Solve...
You might want to take a look at https://github.com/avk959/LazLpSolveIDE
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

 

TinyPortal © 2005-2018